MCPcopy Create free account

hub / github.com/DsThakurRawat/Backend-from-first-Principle / functions

Functions414 in github.com/DsThakurRawat/Backend-from-first-Principle

FunctionVerifyArgon
re-derive with the SAME salt+params, then constant-time compare
4.Authentication and authorization for backend engineers/code/go/04_sessions_2.go:38
FunctionVerifyPassword
(password, stored string)
17.Backend Security: Everything You Need to Know/code/go/slow_hashing_defeating_brute_force_3.go:21
FunctionVerifyRS256
Verify with a PUBLIC key, pinning RS256 (blocks alg:none & key confusion)
4.Authentication and authorization for backend engineers/code/go/05_json_web_tokens_jwt_4.go:2
FunctionVideoProcessingWorkflow
VideoProcessingWorkflow — orchestrates the entire pipeline Temporal persists every step — crash at any point = resume here
10.Task queues and background job/workflows/video_processing.go:13
Method__call__
(self, context, callback)
13.gRPC-and-Inter-Service-Communication-for-Microservices/code/python/authentication_security_8.py:13
Method__init__
(self, redis_client, key: str, capacity: int, refill_rate: float)
10.Task queues and background job/rate_limiter.py:6
Method__init__
(self, name)
2.Routing-in-backend/code/python/a_router_in_python_1.py:27
Method__init__
(self)
2.Routing-in-backend/code/python/a_router_in_python_1.py:47
Method__init__
(self, token)
13.gRPC-and-Inter-Service-Communication-for-Microservices/code/python/authentication_security_8.py:12
Method__init__
(self, repo)
22.Automated-Testing-Unit-Integration-and-E2E/code/python/dependency_injection_for_testability_4.py:3
Method__init__
(self)
22.Automated-Testing-Unit-Integration-and-E2E/code/python/dependency_injection_for_testability_4.py:13
Method__init__
(self)
24.Web-Sockets-And-Real-time-Communication-with-WebSockets/code/python/connection_management_3.py:4
Method__init__
(self)
16.Graceful Shutdown/code/python/72_graceful_shutdown_in_python_1.py:12
Method__init__
(self, db)
6.controllers-services-repositories-middlewares-and-request-context/code/python/07the_repository_layer_4.py:2
Method__init__
(self, repo, mailer)
6.controllers-services-repositories-middlewares-and-request-context/code/python/06the_service_layer_3.py:2
Method__init__
(self, resource: str)
12. Error Handling and Building Fault Tolerant Systems/code/python/python_global_error_handler_fastapi_2.py:17
Method__init__
(self, msg: str)
12. Error Handling and Building Fault Tolerant Systems/code/python/python_global_error_handler_fastapi_2.py:21
Method_on_signal
(self, sig)
16.Graceful Shutdown/code/python/72_graceful_shutdown_in_python_1.py:29
Methodadd_plus
(cls, v: str)
5. Validations and transformations for backend engineers/code/python/example_7.py:17
Functionapp_error_handler
(request: Request, exc: AppError)
12. Error Handling and Building Fault Tolerant Systems/code/python/python_global_error_handler_fastapi_2.py:26
Functionarchive_organization
(id: str)
7.API-DESIGN-RestAPI/code/python/worked_example_a_pm_platform_4.py:34
FunctionauthInterceptor
A unary server interceptor: signature is fixed by the framework.
13.gRPC-and-Inter-Service-Communication-for-Microservices/code/go/interceptors_the_middleware_of_grpc_8.go:2
Functionauth_middleware
(next)
6.controllers-services-repositories-middlewares-and-request-context/code/python/12common_middlewares_6.py:12
Methodbroadcast
(self, message: str)
24.Web-Sockets-And-Real-time-Communication-with-WebSockets/code/python/connection_management_3.py:14
Functioncache_result
Decorator that implements lazy (cache-aside) caching. ttl: time-to-live in seconds (default 1 hour)
9.Caching, the secret behind it all/code/python/104_session_management_with_redis_python_1.py:11
FunctioncallGetUser
===== CLIENT =====
13.gRPC-and-Inter-Service-Communication-for-Microservices/code/go/unary_rpc_2.go:39
Functioncall_get_user
()
13.gRPC-and-Inter-Service-Communication-for-Microservices/code/python/unary_rpc_1.py:26
FunctioncallbackHandler
(w http.ResponseWriter, r *http.Request)
17.Backend Security: Everything You Need to Know/code/go/oidc_vs_oauth_20_one_line_difference_10.go:18
Functioncan_edit
(s: Subject, r: Resource, hour: int)
4.Authentication and authorization for backend engineers/code/python/16_authorization_rbac_11.py:10
Functionchat
(stub)
13.gRPC-and-Inter-Service-Communication-for-Microservices/code/python/bidirectional_streaming_4.py:10
Functionchat
===== CLIENT: typically Send in one goroutine, Recv in another =====
13.gRPC-and-Inter-Service-Communication-for-Microservices/code/go/bidirectional_streaming_5.go:16
MethodcheckSemantics
Type & syntax can't express "not in the future" — semantics need real logic against the real clock.
5. Validations and transformations for backend engineers/code/go/example_4.go:16
MethodcheckSyntax
checkSyntax handles the phone pattern (validator's built-ins cover email + date structure already).
5. Validations and transformations for backend engineers/code/go/example_3.go:19
Functioncheck_csrf
(view)
4.Authentication and authorization for backend engineers/code/python/06_cookies_5.py:4
Functioncheck_password
(hash_: bytes, pw: str)
4.Authentication and authorization for backend engineers/code/python/04_sessions_1.py:15
Functioncors
(next http.Handler)
1.HTTP-AND-CORS/code/go/flow_2_the_preflighted_request_6.go:1
Functioncors_middleware
(next)
6.controllers-services-repositories-middlewares-and-request-context/code/python/12common_middlewares_6.py:3
FunctioncreateBookHandler
---- CONTROLLER: owns HTTP + the validation gate ----
5. Validations and transformations for backend engineers/code/go/example_8.go:32
FunctioncreateNote
(w http.ResponseWriter, r *http.Request)
1.HTTP-AND-CORS/code/go/mime_types_the_content_type_vocabulary_1.go:15
FunctioncreatePayment
key -> []byte result. Use Redis with a TTL in production.
1.HTTP-AND-CORS/code/go/idempotency_in_practice_4.go:3
Functioncreate_book_endpoint
(body: CreateBook)
5. Validations and transformations for backend engineers/code/python/example_8.py:35
Functioncreate_book_handler
()
6.controllers-services-repositories-middlewares-and-request-context/code/python/a_note_on_nodejs_vs_go_python_1.py:9
Functioncreate_book_handler
(request)
6.controllers-services-repositories-middlewares-and-request-context/code/python/14use_case_passing_authentication_data_7.py:1
Functioncreate_note
(note: Note, response: Response)
1.HTTP-AND-CORS/code/python/mime_types_the_content_type_vocabulary_1.py:11
Functioncreate_note
(note: Note)
1.HTTP-AND-CORS/code/python/wiring_methods_to_handlers_3.py:15
Functioncreate_organization
(body: dict)
7.API-DESIGN-RestAPI/code/python/worked_example_a_pm_platform_4.py:9
Functioncreate_payment
(body: dict, idempotency_key: str = Header(...))
7.API-DESIGN-RestAPI/code/python/post_the_only_non_idempotent_one_2.py:2
Functioncreate_payment
(payload: dict, idempotency_key: str = Header(...))
1.HTTP-AND-CORS/code/python/idempotency_in_practice_4.py:6
Functioncreate_session
Create a session after successful login. Store in Redis.
9.Caching, the secret behind it all/code/python/104_session_management_with_redis_python_2.py:8
Functioncreate_todo
(user_id: str, req: CreateTodoRequest)
15.Logging, Monitoring and Observability/services/todo_service.py:8
Methodcross_field_rules
(self)
5. Validations and transformations for backend engineers/code/python/example_5.py:13
Methoddatabase_url
(self)
14.Production-grade Configuration Management/code/python/93_example_yaml_config_file_1.py:47
Functiondb_url
()
22.Automated-Testing-Unit-Integration-and-E2E/code/python/testing_with_a_real_database_6.py:6
Functiondead_zone
()
4.Authentication and authorization for backend engineers/code/python/16_authorization_rbac_10.py:17
Functiondeco
(view)
4.Authentication and authorization for backend engineers/code/python/16_authorization_rbac_10.py:4
Functiondecorator
(func)
9.Caching, the secret behind it all/code/python/104_session_management_with_redis_python_1.py:16
Functiondecorator
(func)
10.Task queues and background job/code/python/step_4_key_grafana_panels_to_build_2.py:35
Functiondelete_note
(id: int)
1.HTTP-AND-CORS/code/python/wiring_methods_to_handlers_3.py:24
Functiondelete_organization
(id: str)
7.API-DESIGN-RestAPI/code/python/worked_example_a_pm_platform_4.py:28
Functiondelete_session
Logout — delete session from Redis immediately.
9.Caching, the secret behind it all/code/python/104_session_management_with_redis_python_2.py:41
Methoddeny
(request, context)
13.gRPC-and-Inter-Service-Communication-for-Microservices/code/python/interceptors_the_middleware_of_grpc_7.py:9
Methoddeserialize
(self, data: str)
3.Serialization-and-Deserialization-or-backend-engineers/code/python/serialization_in_python_1.py:20
Methoddispatch
(self, request: Request, call_next)
18. Backend Scaling and Performance Engineering-part-1/code/python/example_2.py:9
Methoddispatch
(self, request, call_next)
1.HTTP-AND-CORS/code/python/security_headers_the_attack_each_one_sto_2.py:4
Functiondownload
()
1.HTTP-AND-CORS/code/python/the_exchange_step_by_step_12.py:5
Functiondownload
http.ServeContent handles Range, 206, 416 and If-Range for you, driven by the file's modtime and an optional ETag.
1.HTTP-AND-CORS/code/go/the_exchange_step_by_step_12.go:3
Functionexchange
(code: str, verifier: str)
4.Authentication and authorization for backend engineers/code/python/13_oauth_20_9.py:11
Functionexchange
Leg 2: exchange the code (send code_verifier, not the secret).
4.Authentication and authorization for backend engineers/code/go/13_oauth_20_9.go:12
Functionfetch
(request, env)
19.Backend Scaling and Performance Engineering: Part-2/code/javascript/example_1.js:3
Functionfetch_user_data
(user_id)
20.Concurrency & Parallelism: IO Bound vs CPU Bound/code/python/two_things_this_explains_3.py:1
Functionfetch_user_data_machine
(user_id)
20.Concurrency & Parallelism: IO Bound vs CPU Bound/code/python/two_things_this_explains_4.py:2
Methodfind_book_by_id
(self, book_id: int)
6.controllers-services-repositories-middlewares-and-request-context/code/python/07the_repository_layer_4.py:13
Functionfk_violation_handler
(request: Request, exc)
12. Error Handling and Building Fault Tolerant Systems/code/python/python_global_error_handler_fastapi_2.py:39
FunctiongetNote
remove (idempotent)
1.HTTP-AND-CORS/code/go/wiring_methods_to_handlers_3.go:12
FunctiongetResource
(w http.ResponseWriter, r *http.Request)
1.HTTP-AND-CORS/code/go/layer_2_validation_via_etag_last_modifie_9.go:1
FunctiongetUser
(w http.ResponseWriter, r *http.Request)
1.HTTP-AND-CORS/code/go/status_codes_7.go:1
Functionget_invoice
(invoice_id: int, current_user_id: int)
17.Backend Security: Everything You Need to Know/code/python/python_secure_patterns_reference_4.py:1
Functionget_note
(id: int)
1.HTTP-AND-CORS/code/python/wiring_methods_to_handlers_3.py:8
Functionget_organization
(id: str)
7.API-DESIGN-RestAPI/code/python/worked_example_a_pm_platform_4.py:17
Functionget_product
(product_id: str)
9.Caching, the secret behind it all/code/python/104_session_management_with_redis_python_1.py:43
Functionget_product
(product_id: str)
18. Backend Scaling and Performance Engineering-part-1/code/python/example_6.py:5
Functionget_resource
(request: Request)
1.HTTP-AND-CORS/code/python/layer_2_validation_via_etag_last_modifie_9.py:5
Functionget_session
Validate session on every authenticated API request. Redis O(1) lookup — microseconds, not milliseconds.
9.Caching, the secret behind it all/code/python/104_session_management_with_redis_python_2.py:24
Functionget_settings
()
14.Production-grade Configuration Management/code/python/93_example_yaml_config_file_1.py:55
Functionget_user
(id: int, authorization: str = Header(default=""))
1.HTTP-AND-CORS/code/python/status_codes_7.py:4
Functionget_weather
(city: str)
9.Caching, the secret behind it all/code/python/104_session_management_with_redis_python_1.py:51
Functiongreeting
(accept_language: str = Header(default="en"))
1.HTTP-AND-CORS/code/python/compression_the_same_negotiation_applied_11.py:9
Methodhandle
(self, req)
2.Routing-in-backend/code/python/a_router_in_python_1.py:33
Methodhandle
(self, req)
2.Routing-in-backend/code/python/a_router_in_python_1.py:38
FunctionhandleGetUser
(w http.ResponseWriter, r *http.Request)
20.Concurrency & Parallelism: IO Bound vs CPU Bound/code/go/a_typical_go_handler_2.go:1
FunctionhandleRequest
(req, res)
20.Concurrency & Parallelism: IO Bound vs CPU Bound/code/javascript/pythons_asyncio_the_same_idea_2.js:2
Functionhash_password
(pw: str)
4.Authentication and authorization for backend engineers/code/python/04_sessions_1.py:11
FunctionhealthHandler
(db *pgxpool.Pool, rdb *redis.Client)
12. Error Handling and Building Fault Tolerant Systems/code/go/go_deep_health_check_endpoint_2.go:6
Functionincrement
()
20.Concurrency & Parallelism: IO Bound vs CPU Bound/code/python/python_asynciolock_for_async_code_6.py:6
Functioninit
()
19.Backend Scaling and Performance Engineering: Part-2/code/go/example_4.go:17
Methodintercept_service
(self, continuation, handler_call_details)
13.gRPC-and-Inter-Service-Communication-for-Microservices/code/python/interceptors_the_middleware_of_grpc_7.py:4
Functionis_revoked
(rdb, jti_or_token: str)
4.Authentication and authorization for backend engineers/code/python/05_json_web_tokens_jwt_3.py:23
FunctionlistUsers
===== CLIENT: call once, then Recv() in a loop until io.EOF =====
13.gRPC-and-Inter-Service-Communication-for-Microservices/code/go/server_streaming_3.go:14
Functionlist_books_handler
()
6.controllers-services-repositories-middlewares-and-request-context/code/python/a_note_on_nodejs_vs_go_python_2.py:1
Functionlist_notes
(done: bool | None = None, limit: int = 20)
1.HTTP-AND-CORS/code/python/wiring_methods_to_handlers_3.py:5
← previousnext →201–300 of 414, ranked by callers