MCPcopy Create free account

hub / github.com/Shankar-105/Social-Media-Api / functions

Functions373 in github.com/Shankar-105/Social-Media-Api

↓ 1 callersMethodrun_presence_watchdog
Close stale sockets when heartbeats stop arriving.
app/utils/socket_manager.py:108
↓ 1 callersFunctionrun_test_migrations
()
pytests/conftest.py:227
↓ 1 callersFunctionsignupTestUser
()
loadtests/common.js:19
↓ 1 callersMethodstats
(self)
pytests/test_celery_infrastructure.py:32
↓ 1 callersMethodtyping_status
(self, message_type: str, receiver_id: int, typing_status: bool)
app/utils/socket_manager.py:179
↓ 1 callersFunctionverifyOtp
(db:AsyncSession,otp:str,currentUser:models.User)
app/routes/changepassword.py:28
Method__call__
(self, scope, receive, send)
app/utils/observability.py:73
Method__init__
(self, active=None, reserved=None, stats=None)
pytests/test_celery_infrastructure.py:21
Method__init__
(self, resource: str, identifier: Any, details: Optional[Dict[str, Any]] = None)
app/utils/exceptions.py:22
Method__init__
(self, message: str, details: Optional[Dict[str, Any]] = None)
app/utils/exceptions.py:32
Method__init__
(self, message: str = "Could not validate credentials")
app/utils/exceptions.py:41
Method__init__
(self, message: str = "Not enough permissions")
app/utils/exceptions.py:50
Method__init__
(self, message: str = "A database error occurred", details: Optional[Dict[str, Any]] = None)
app/utils/exceptions.py:58
Method__init__
(self, message: str, details: Optional[Dict[str, Any]] = None)
app/utils/exceptions.py:67
Method__init__
(self, message: str = "Too many requests")
app/utils/exceptions.py:76
Method__init__
(self, message: str, error_code: str = "BUSINESS_LOGIC_ERROR", details: Optional[Dict[str, Any]] = None)
app/utils/exceptions.py:84
Method__init__
(self, message: str, details: Optional[Dict[str, Any]] = None)
app/utils/exceptions.py:93
Method__init__
(self, app: FastAPI)
app/utils/observability.py:70
Method__init__
(self)
app/utils/socket_manager.py:13
Function_build_post_detail
(post: models.Post, is_liked: bool)
app/routes/saved.py:17
Function_createAccessToken_sync
Synchronous JWT encode — runs on a thread pool when called via createAccessToken().
app/oauth2.py:30
Function_decodeToken_sync
Synchronous JWT decode — runs on a thread pool when called via decodeToken().
app/oauth2.py:43
Function_delete_if_exists
(path: str)
app/services/blob_service.py:91
Function_fast_hash_password
(raw: str)
pytests/conftest.py:79
Function_fast_verify_password
(raw: str, hashed: str)
pytests/conftest.py:83
Function_fixed_otp
()
pytests/conftest.py:41
Function_hashPassword_sync
Synchronous bcrypt hash — runs on a thread pool when called via hashPassword().
app/utils/thread_helpers.py:9
Function_noop_check
(key: str, max_calls: int, window: int)
pytests/conftest.py:98
Function_noop_send
(*args, **kwargs)
pytests/conftest.py:44
Function_skip_listener_startup
()
pytests/conftest.py:31
Function_verifyPassword_sync
Synchronous bcrypt verify — runs on a thread pool when called via verifyPassword().
app/utils/thread_helpers.py:16
Function_write_bytes
(path: str, data: bytes)
app/services/blob_service.py:86
Functionadd_otel_trace_id
Adds OpenTelemetry trace and span IDs to the log event.
app/utils/logging.py:9
Functionadd_to_blacklist
Adds a token to the Redis blacklist.
app/services/redis_service.py:157
Functionapp_exception_handler
(request: Request, exc: AppException)
app/utils/exception_handlers.py:13
Methodapply_async
(self, *args, **kwargs)
pytests/conftest.py:63
Functionbuild_versioned_feed_cache_key
Build a versioned feed cache key. feed_type: 'home' or 'explore' version: from get_cache_version() Example: feed:home:123:v5:0:1
app/services/redis_service.py:230
Functioncan_edit
(msg_id:int,db:AsyncSession=Depends(db.getDb),currentUser:models.User = Depends(oauth2.getCurrentUser))
app/messaging/edit_msg.py:24
Functionchange_password
(db: AsyncSession = Depends(db.getDb),currentUser:models.User=Depends(oauth2.getCurrentUser),_:None=Depends(ch
app/routes/changepassword.py:19
Functionchat
( websocket: WebSocket, user_id: int, token: str = Query(None, description="Search query params"),
app/messaging/chat.py:22
FunctioncheckOtp
(db:AsyncSession,email:str,user_otp:str)
app/services/otp_service.py:37
Functioncleanup_expired_otps
(self)
app/tasks/otp_cleanup_task.py:9
Functionclear_chat
(friend_id:int,db:AsyncSession =Depends(db.getDb),current_user:models.User=Depends(oauth2.getCurrentUser))
app/messaging/clear_chat.py:18
Functionclient
()
pytests/conftest.py:285
Functionconnection_manager
Fresh ConnectionManager for each test.
pytests/test_cross_process_chat_delivery.py:39
FunctioncreateAccessToken
Create a JWT token — offloaded to a thread pool to avoid blocking the event loop.
app/oauth2.py:55
Functioncreate_comment
(post_id:int, comment:sch.CommentCreateRequest=Body(...), db:AsyncSession=Depends(db.getDb), currentUser: mode
app/routes/comment.py:19
Functioncreate_notification_task
( self, actor_id: int, owner_id: int, notif_type: str, actor_username: str, entity_id:
app/tasks/notification_tasks.py:6
Functioncreate_post
( title:str=Form(...), content:str=Form(...), media:Optional[UploadFile]=File(None), # Optional f
app/routes/posts.py:95
Functioncreate_test_user
(client)
pytests/conftest.py:296
FunctiondeleteForMe
( share_id: int, db: AsyncSession=Depends(db.getDb), me: models.User = Depends(oauth2.getCurrentUs
app/messaging/delete_shares.py:23
FunctiondeleteForMe
( msg_id: int, db: AsyncSession=Depends(db.getDb), me: models.User = Depends(oauth2.getCurrentUser
app/messaging/delete_msg.py:26
Functiondelete_comment
(commentId:int, db:AsyncSession=Depends(db.getDb), currentUser: models.User = Depends(oauth2.getCurrentUser))
app/routes/comment.py:64
Functiondelete_for_everyone
( db:AsyncSession, message_id:int, sender_id: int, receiver_id: int, )
app/messaging/delete_msg.py:52
Functiondelete_post
(postId:int, db:AsyncSession=Depends(getDb), currentUser:models.User=Depends(oauth2.getCurrentUser))
app/routes/posts.py:160
Functiondelete_profile_picture
(db:AsyncSession=Depends(db.getDb), currentUser:models.User=Depends(oauth2.getCurrentUser))
app/routes/me.py:57
Functiondelete_share_for_everyone
( db:AsyncSession, share_id:int, sender_id: int, receiver_id: int, )
app/messaging/delete_shares.py:42
Functiondependency
(request: Request)
app/services/rate_limit_service.py:69
Functiondowngrade
()
alembic/versions/a4d7c9e2b1f0_add_search_trgm_indexes.py:36
Functiondowngrade
()
alembic/versions/e9b7c6a5d4f2_add_counter_triggers.py:201
Functiondowngrade
()
alembic/versions/c1f4f99c7a10_add_saved_posts_table.py:35
Functiondowngrade
Downgrade schema.
alembic/versions/6d3a844fb941_add_notifications_table.py:28
Functiondowngrade
()
alembic/versions/b2c1e7d3f901_add_user_version_id_for_optimistic_locking.py:28
Functiondowngrade
()
alembic/versions/f2a6c1d4b8e9_hash_auth_secrets.py:63
Functiondowngrade
Downgrade schema.
alembic/versions/622ae475b8e8_fresh_start_all_models_in_one_migration.py:199
Functiondowngrade
()
alembic/versions/f87ab2d91c3e_add_last_seen_at_to_users.py:25
Functiondowngrade
()
alembic/versions/d8a5f4b7c2e1_harden_schema_indexes.py:262
Functiondowngrade
()
alembic/versions/5ac7db1d4f3c_add_email_verified_to_users.py:29
Functiondowngrade
Downgrade schema.
alembic/versions/9aafdcad5a6d_add_refresh_tokens_table.py:40
Functiondrop_color_if_prod
Ensure no color codes in production JSON logs.
app/utils/logging.py:23
Functionedit_message
(db:AsyncSession,message_id:int,new_content:str,sender_id:int,recv_id:int)
app/messaging/edit_msg.py:42
Functionfake_purge
()
pytests/test_celery_infrastructure.py:126
Functionfake_revoke
(task_id, terminate=False)
pytests/test_celery_infrastructure.py:123
Functionflush_post_views
Celery beat task: flush queued post views from Redis into Postgres in a single bulk update. Behavior: - Reads all members from `post:views:qu
app/tasks/post_view_flush_task.py:10
Functionfollow_user
(user_id:int, db:AsyncSession=Depends(getDb), currentUser:models.User=Depends(oauth2.getCurrentUser), backgrou
app/routes/connect.py:23
Functionforgot_password
(payload: sch.ForgotPasswordSchema, db: AsyncSession = Depends(db.getDb), _: None = Depends(forgot_password_li
app/routes/auth.py:105
FunctiongenerateOtp
()
app/services/otp_service.py:18
FunctiongetCurrentUser
(token: str = Depends(oauth2_scheme), dbs: AsyncSession = Depends(db.getDb))
app/oauth2.py:133
FunctiongetDb
()
app/db.py:47
FunctiongetExploreFeed
(limit:int=Query(20, ge=1, le=100), offset: int = Query(0,ge=0), db:AsyncSession=Depends(db.getDb),
app/routes/feed.py:99
FunctiongetHomeFeed
(limit:int=Query(10, ge=1, le=100), offset: int = Query(0,ge=0), db:AsyncSession=Depends(db.getDb),
app/routes/feed.py:19
Functionget_active_tasks
Get list of all active tasks currently being processed. Returns: List of tasks with their IDs, names, and arguments.
app/routes/celery_tasks.py:71
Functionget_auth_cache_and_blacklist
Fetch blacklist flag and auth cache in a single Redis roundtrip. Returns (is_blacklisted, cached_user_payload_or_none).
app/services/redis_service.py:178
Functionget_cache_version
Get the current cache version for a domain.
app/services/redis_service.py:218
Functionget_chat_history
( friend_id: int, db: AsyncSession = Depends(getDb), currentUser: models.User = Depends(oauth2.get
app/messaging/chat_history.py:19
Functionget_comment_stats
(db:AsyncSession=Depends(db.getDb), currentUser:models.User=Depends(oauth2.getCurrentUser))
app/routes/me.py:328
Functionget_commented_posts
(db:AsyncSession=Depends(db.getDb), currentUser:models.User=Depends(oauth2.getCurrentUser))
app/routes/me.py:306
Functionget_current_user_avatar
(db:AsyncSession=Depends(db.getDb), currentUser:models.User=Depends(oauth2.getCurrentUser))
app/routes/me.py:44
Functionget_current_user_posts
(limit:int=Query(10, ge=1, le=100), offset: int = Query(0, ge=0), db:AsyncSession=Depends(db.getDb), currentUs
app/routes/me.py:82
Functionget_disliked_posts_list
(db:AsyncSession=Depends(db.getDb), currentUser:models.User=Depends(oauth2.getCurrentUser))
app/routes/me.py:286
Functionget_followers
(user_id:int, db:AsyncSession=Depends(db.getDb), currentUser:models.User=Depends(oauth2.getCurrentUser))
app/routes/users.py:144
Functionget_followers_list
(user_id:int, db:AsyncSession=Depends(getDb), currentUser:models.User=Depends(oauth2.getCurrentUser))
app/routes/connect.py:146
Functionget_following
(user_id:int, db:AsyncSession=Depends(db.getDb), currentUser:models.User=Depends(oauth2.getCurrentUser))
app/routes/users.py:177
Functionget_following_list
(user_id:int, db:AsyncSession=Depends(getDb), currentUser:models.User=Depends(oauth2.getCurrentUser))
app/routes/connect.py:184
Functionget_liked_posts_list
(db:AsyncSession=Depends(db.getDb), currentUser:models.User=Depends(oauth2.getCurrentUser))
app/routes/me.py:266
Functionget_message_info
( msg_id: int, db: AsyncSession = Depends(db.getDb), currentUser: models.User = Depends(oauth2.get
app/messaging/msg_info.py:13
Functionget_my_notifications
( limit: int = Query(20, ge=1, le=100), offset: int = Query(0, ge=0), db_session: AsyncSession = D
app/routes/notifications.py:23
Functionget_notifications
Return paginated notifications for a user, newest first.
app/services/notification_service.py:120
Functionget_post
(postId:int, db:AsyncSession=Depends(getDb), currentUser:models.User=Depends(oauth2.getCurrentUser))
app/routes/posts.py:28
Functionget_post_comments
(post_id:int, limit:int=Query(10, ge=1, le=100), offset: int = Query(0, ge=0), db:AsyncSession=Depends(db.
app/routes/comment.py:110
← previousnext →101–200 of 373, ranked by callers