Skip to main content

tc_auth

tc_auth is a Python authentication module designed for FastAPI applications. It provides reusable services for account management, login/signup flows, session handling, OTP verification, and OAuth login integrations.

What this code includes

  • Auth bootstrap class (tc_auth/auth.py) to wire services, dependencies, and exception handlers.
  • Database models (tc_auth/db/models.py) for accounts, sessions, OTP records, and OAuth-linked accounts.
  • Core services (tc_auth/service/) for authentication, account operations, sessions, OTP, OAuth, and user lookup.
  • Dependency helpers (tc_auth/dependencies/) to retrieve current user/session and enforce role/status checks.
  • OAuth adapters (tc_auth/oauth/) for Google and GitHub login flows.
  • JWT utilities and exception handling for token generation/verification and auth-specific errors.

Typical usage

Create an Auth instance with your SQLAlchemy engine and FastAPI app, then use exposed services/dependencies in your routes.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tc_auth-1.5.0.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tc_auth-1.5.0-py3-none-any.whl (32.8 kB view details)

Uploaded Python 3

File details

Details for the file tc_auth-1.5.0.tar.gz.

File metadata

  • Download URL: tc_auth-1.5.0.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for tc_auth-1.5.0.tar.gz
Algorithm Hash digest
SHA256 b8bfd960e6d419154d7527eff5002a1f6242179b01b1903e2d92bb6ec1b0014c
MD5 9f33377b054d0c1bf0a94625ea349d0c
BLAKE2b-256 6d5157ac8ca5837ed9f59d1d135238166504fe5b21ad0921cb7ee9fa136307f8

See more details on using hashes here.

File details

Details for the file tc_auth-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: tc_auth-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 32.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for tc_auth-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4417504e7cdf7e72c9a7a6ab7c61ceb870372af5bd98cdb64b8bcc042d967e1e
MD5 531da7854b550109ee1673daa70ec6aa
BLAKE2b-256 4373aa22810a18509cc36866497c66c3dd1c42d67d3e7962a574938085062c63

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.5.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page