Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DsThakurRawat/Backend-from-first-Principle
/ functions
Functions
414 in github.com/DsThakurRawat/Backend-from-first-Principle
⨍
Functions
414
◇
Types & classes
104
↳
Endpoints
38
Function
list_organizations
( status: str | None = None, sortBy: str = "createdAt", # sane default sortOrder: str = "de
7.API-DESIGN-RestAPI/code/python/filtering_3.py:3
Function
list_organizations
()
7.API-DESIGN-RestAPI/code/python/worked_example_a_pm_platform_4.py:6
Function
list_users
(stub)
13.gRPC-and-Inter-Service-Communication-for-Microservices/code/python/server_streaming_2.py:11
Function
loggingInterceptor
(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler)
13.gRPC-and-Inter-Service-Communication-for-Microservices/code/go/interceptors_the_middleware_of_grpc_8.go:15
Function
logging_middleware
(next)
6.controllers-services-repositories-middlewares-and-request-context/code/python/10the_next_function_5.py:3
Function
login
(response: Response, email: str, password: str)
19.Backend Scaling and Performance Engineering: Part-2/code/python/example_1.py:8
Function
login
(email: str, password: str, response: Response)
17.Backend Security: Everything You Need to Know/code/python/python_secure_patterns_reference_3.py:9
Function
login
()
4.Authentication and authorization for backend engineers/code/python/04_sessions_1.py:22
Function
login
(response: Response)
1.HTTP-AND-CORS/code/python/two_authentication_architectures_5.py:6
Function
login
Set a secure session cookie after login (stateful)
1.HTTP-AND-CORS/code/go/two_authentication_architectures_5.go:2
Function
loginHandler
(db *pgxpool.Pool, redis *redis.Client)
17.Backend Security: Everything You Need to Know/code/go/complete_secure_login_endpoint_9.go:1
Method
lower_email
(cls, v: str)
5. Validations and transformations for backend engineers/code/python/example_7.py:12
Function
main
()
3.Serialization-and-Deserialization-or-backend-engineers/code/go/serialization_in_go_1.go:49
Function
main
()
10.Task queues and background job/main.go:10
Function
main
()
10.Task queues and background job/scheduler/main.go:9
Function
main
==================== MAIN (putting it all together) ====================
2.Routing-in-backend/Router.go:238
Function
main
()
2.Routing-in-backend/code/go/a_router_in_go_1.go:86
Function
main
()
13.gRPC-and-Inter-Service-Communication-for-Microservices/code/go/unary_rpc_2.go:30
Function
main
()
18. Backend Scaling and Performance Engineering-part-1/code/go/example_1.go:27
Function
main
()
18. Backend Scaling and Performance Engineering-part-1/code/go/example_3.go:6
Function
main
()
24.Web-Sockets-And-Real-time-Communication-with-WebSockets/code/go/a_websocket_server_1.go:28
Function
main
()
16.Graceful Shutdown/code/go/72_graceful_shutdown_in_python_1.go:14
Function
main
()
5. Validations and transformations for backend engineers/code/go/example_8.go:64
Function
main
()
15.Logging, Monitoring and Observability/main.go:7
Function
main
()
11.Full text search using Elasticsearch for blazingly fast search/code/go/go_full_text_search_handler_1.go:57
Function
main
()
20.Concurrency & Parallelism: IO Bound vs CPU Bound/code/go/python_asynciolock_for_async_code_4.go:17
Function
main
()
20.Concurrency & Parallelism: IO Bound vs CPU Bound/code/go/python_asynciolock_for_async_code_3.go:8
Function
main
main.go
12. Error Handling and Building Fault Tolerant Systems/code/go/go_config_validation_at_boot_1.go:47
Function
main
()
1.HTTP-AND-CORS/code/go/mime_types_the_content_type_vocabulary_1.go:30
Function
me
(_=Depends(require_token))
1.HTTP-AND-CORS/code/python/two_authentication_architectures_5.py:26
Function
newPKCE
Build the PKCE pair before redirecting the user.
4.Authentication and authorization for backend engineers/code/go/13_oauth_20_9.go:2
Function
new_pkce
()
4.Authentication and authorization for backend engineers/code/python/13_oauth_20_9.py:4
Method
normalize
normalize runs AFTER validation passes and BEFORE the data is handed to the service layer.
5. Validations and transformations for backend engineers/code/go/example_7.go:7
Method
not_in_future
(cls, v: date)
5. Validations and transformations for backend engineers/code/python/example_4.py:11
Function
notes
()
4.Authentication and authorization for backend engineers/code/python/07_stateful_authentication_6.py:19
Method
notify_owner
(self, email: str)
6.controllers-services-repositories-middlewares-and-request-context/code/python/06the_service_layer_3.py:14
Function
oldRoute
Permanent move that must keep the method/body -> 308
1.HTTP-AND-CORS/code/go/redirections_8.go:2
Function
old_route
(id: int)
1.HTTP-AND-CORS/code/python/redirections_8.py:5
Function
on_delivery
(err, msg)
23.Message-Brokers-and-Event-Streaming-with-Kafka/code/python/producers_1.py:12
Function
parsePagination
Query params are ALWAYS strings, so we must CAST (transform) before we can VALIDATE the numbers.
5. Validations and transformations for backend engineers/code/go/example_6.go:16
Function
parseTypes
(r *http.Request)
5. Validations and transformations for backend engineers/code/go/example_2.go:18
Function
patch_note
(id: int, patch: dict)
1.HTTP-AND-CORS/code/python/wiring_methods_to_handlers_3.py:21
Function
put_note
(id: int, note: Note)
1.HTTP-AND-CORS/code/python/wiring_methods_to_handlers_3.py:18
Function
refresh
(rdb, presented: str)
4.Authentication and authorization for backend engineers/code/python/05_json_web_tokens_jwt_4.py:6
Function
regenerate_session
(old_sid: str)
4.Authentication and authorization for backend engineers/code/python/06_cookies_5.py:17
Method
register
(self, ws: WebSocket)
24.Web-Sockets-And-Real-time-Communication-with-WebSockets/code/python/connection_management_3.py:7
Function
repo
(db_url)
22.Automated-Testing-Unit-Integration-and-E2E/code/python/testing_with_a_real_database_6.py:14
Function
request_id_middleware
(next)
6.controllers-services-repositories-middlewares-and-request-context/code/python/cancellation_abort_signals_deadlines_8.py:3
Function
requireToken
Bearer-token auth middleware (stateless)
1.HTTP-AND-CORS/code/go/two_authentication_architectures_5.go:17
Function
require_api_key
(view)
4.Authentication and authorization for backend engineers/code/python/10_api_key_authentication_8.py:7
Function
require_jwt
(view)
4.Authentication and authorization for backend engineers/code/python/08_stateless_authentication_7.py:1
Function
require_role
(*roles)
4.Authentication and authorization for backend engineers/code/python/16_authorization_rbac_10.py:2
Function
require_session
(view)
4.Authentication and authorization for backend engineers/code/python/07_stateful_authentication_6.py:4
Function
require_token
(cred: HTTPAuthorizationCredentials = Depends(bearer))
1.HTTP-AND-CORS/code/python/two_authentication_architectures_5.py:20
Function
runClient
github.com/gorilla/websocket
24.Web-Sockets-And-Real-time-Communication-with-WebSockets/code/go/a_websocket_client_2.go:2
Function
runPipeline
runPipeline decodes then validates; returns 400-ready messages.
5. Validations and transformations for backend engineers/code/go/example_1.go:24
Function
run_pipeline
Decode + validate in one call. Raises a 400-ready error on failure.
5. Validations and transformations for backend engineers/code/python/example_1.py:13
Function
sanitise_comment
(raw_html: str)
17.Backend Security: Everything You Need to Know/code/python/content_security_policy_csp_last_line_of_2.py:6
Function
securityHeaders
(next http.Handler)
1.HTTP-AND-CORS/code/go/security_headers_the_attack_each_one_sto_2.go:1
Function
sendEmailWithRetry
(to, subject, body string)
12. Error Handling and Building Fault Tolerant Systems/code/go/automatic_vs_manual_recovery_3.go:1
Function
send_email_task
(self, email, token)
10.Task queues and background job/rate_limiter.py:47
Function
send_invitation_email
(self, email: str, invite_url: str)
19.Backend Scaling and Performance Engineering: Part-2/code/python/example_2.py:6
Function
send_verification_email
Called by the worker process. self.retry() implements exponential backoff automatically.
10.Task queues and background job/tasks.py:10
Function
send_verification_email
(self, user_id, email, token)
10.Task queues and background job/code/python/step_4_key_grafana_panels_to_build_2.py:56
Function
send_verification_email
(self, user_id: str, email: str, token: str)
10.Task queues and background job/code/python/pattern_4_exactly_once_via_sqs_fifo_dedu_1.py:8
Method
serialize
(self, obj)
3.Serialization-and-Deserialization-or-backend-engineers/code/python/serialization_in_python_1.py:18
Function
setupLogger
()
17.Backend Security: Everything You Need to Know/code/go/③_security_headers_7.go:3
Function
sign
(user_id: str, role: str)
4.Authentication and authorization for backend engineers/code/python/05_json_web_tokens_jwt_3.py:7
Function
signup
(body: SignupRequest)
10.Task queues and background job/signup.py:8
Function
start
(controller)
11.Full text search using Elasticsearch for blazingly fast search/code/javascript/streaming_results_from_two_sources_nodej_1.js:10
Function
stream
()
1.HTTP-AND-CORS/code/python/large_downloads_server_client_streaming_14.py:13
Function
stream
2. Stream a response in chunks (Server-Sent Events)
1.HTTP-AND-CORS/code/go/large_downloads_server_client_streaming_14.go:14
Function
submitForm
Post/Redirect/Get -> 303 so a browser refresh won't re-POST the form
1.HTTP-AND-CORS/code/go/redirections_8.go:7
Function
submit_form
()
1.HTTP-AND-CORS/code/python/redirections_8.py:10
Function
temp_store
(tmp_path)
22.Automated-Testing-Unit-Integration-and-E2E/code/python/fixtures_factories_8.py:5
Function
test_accepts_valid_password
()
22.Automated-Testing-Unit-Integration-and-E2E/code/python/unit_tests_2.py:10
Function
test_apply_discount
(subtotal, percent, expected)
22.Automated-Testing-Unit-Integration-and-E2E/code/python/table_driven_parametrized_tests_5.py:14
Function
test_create_user_returns_201
()
22.Automated-Testing-Unit-Integration-and-E2E/code/python/testing_http_handlers_apis_7.py:6
Function
test_discount_applies_percentage
()
22.Automated-Testing-Unit-Integration-and-E2E/code/python/anatomy_of_a_test_1.py:3
Function
test_fetch_rate
()
22.Automated-Testing-Unit-Integration-and-E2E/code/python/mocking_time_randomness_external_apis_9.py:12
Function
test_greet_sends_email
()
22.Automated-Testing-Unit-Integration-and-E2E/code/python/test_doubles_3.py:8
Function
test_parse_event_perf
(benchmark)
22.Automated-Testing-Unit-Integration-and-E2E/code/python/performance_load_testing_10.py:2
Function
test_place_rejects_invalid_total
()
22.Automated-Testing-Unit-Integration-and-E2E/code/python/dependency_injection_for_testability_4.py:16
Function
test_rejects_short_password
()
22.Automated-Testing-Unit-Integration-and-E2E/code/python/unit_tests_2.py:7
Function
test_save_and_find
(repo)
22.Automated-Testing-Unit-Integration-and-E2E/code/python/testing_with_a_real_database_6.py:21
Function
test_signup
(temp_store)
22.Automated-Testing-Unit-Integration-and-E2E/code/python/fixtures_factories_8.py:14
Function
test_token_expiry
()
22.Automated-Testing-Unit-Integration-and-E2E/code/python/mocking_time_randomness_external_apis_9.py:5
Function
track_metrics
(task_name: str)
10.Task queues and background job/code/python/step_4_key_grafana_panels_to_build_2.py:34
Function
unhandled_error_handler
(request: Request, exc: Exception)
12. Error Handling and Building Fault Tolerant Systems/code/python/python_global_error_handler_fastapi_2.py:44
Function
unique_violation_handler
(request: Request, exc)
12. Error Handling and Building Fault Tolerant Systems/code/python/python_global_error_handler_fastapi_2.py:33
Function
updateDoc
(w http.ResponseWriter, r *http.Request)
1.HTTP-AND-CORS/code/go/the_optimistic_locking_flow_10.go:1
Function
update_doc
(id: int, request: Request, if_match: str = Header(default=""))
1.HTTP-AND-CORS/code/python/the_optimistic_locking_flow_10.py:4
Function
update_organization
(id: str, body: dict, if_match: str | None = Header(None))
7.API-DESIGN-RestAPI/code/python/post_the_only_non_idempotent_one_1.py:2
Function
update_organization
(id: str, body: dict)
7.API-DESIGN-RestAPI/code/python/worked_example_a_pm_platform_4.py:24
Function
upload
(file: UploadFile)
1.HTTP-AND-CORS/code/python/large_downloads_server_client_streaming_14.py:7
Function
upload
1. Receive a multipart upload
1.HTTP-AND-CORS/code/go/large_downloads_server_client_streaming_14.go:2
Function
uploadEvents
===== CLIENT: Send() many, then CloseAndRecv() for the single reply =====
13.gRPC-and-Inter-Service-Communication-for-Microservices/code/go/client_streaming_4.go:18
Function
upload_events
(stub, events)
13.gRPC-and-Inter-Service-Communication-for-Microservices/code/python/client_streaming_3.py:13
Function
verify_argon
(encoded: str, pw: str)
4.Authentication and authorization for backend engineers/code/python/04_sessions_2.py:23
Function
verify_rs256
(token: str, public_key)
4.Authentication and authorization for backend engineers/code/python/05_json_web_tokens_jwt_4.py:2
← previous
next →
301–400 of 414, ranked by callers