Skip to main content

abstract_security

Env-driven secrets loading and security primitives: .env resolution, password hashing, token utilities, and a library of type/path/ssh helpers.

abstract_security is the foundation layer of the Abstract Secure Backend stack. Everything else builds on it for locating .env files, reading secrets, hashing passwords, and issuing/validating tokens.


Where this fits

abstract-securefiles   React/TypeScript UI components
abstract_logins        Flask blueprints: auth + secure files
abstract_queries       Domain query managers (users, uploads, ...)
abstract_database      Lazy PostgreSQL connection + helpers
abstract_security  <-- you are here: env loading, hashing, tokens, utilities

Dependencies flow downward; this layer depends only on abstract_utilities and python-dotenv.


Install

pip install abstract_security

Requires Python ≥ 3.6.


Usage

from abstract_security import get_env_value, get_env_path

# Resolve a value from a .env file, searching sensible default locations
# (cwd, home, and ~/.envy_all) unless an explicit path is given.
db_url = get_env_value("ABSTRACT_DATABASE_URL")
env_file = get_env_path()            # where the .env was found

It also exposes password/token helpers (bcrypt hashing, JWT) and a broad set of utility modules (type_utils, path_utils, ssh_utils, string_utils, compare_utils, …) shared across the stack.


Design notes

  • Flexible .env discovery — looks in the current working directory, the home directory, and a dedicated ~/.envy_all directory, or an explicit path.
  • One definition per symbol — shared primitives like SingletonMeta are defined once, so behaviour is predictable across the stack.

License

MIT.

Metadata

Release files for abstract-security 0.84

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for abstract-security 0.84
File Size Uploaded Provenance Actions
abstract_security-0.84.tar.gz 8.3 kB Without provenance Details for abstract_security-0.84.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for abstract-security 0.84
File Interpreter ABI Platform Actions
abstract_security-0.84-py3-none-any.whl Python 3 none any Details for abstract_security-0.84-py3-none-any.whl

Total release size: 17.8 kB

Release files / abstract_security-0.84.tar.gz

Download URL abstract_security-0.84.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5c0d48fdc7cbd33d4c60bc6f3598853fa5d9326c9e6b20c4e1a400f4d222e880
BLAKE2b-256 checksum
How to use checksums
8aa9d5579da79efa2c03a5115d209705e04961ad0d930fe635220589db6b01b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / abstract_security-0.84-py3-none-any.whl

Download URL abstract_security-0.84-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e45b05b4e2764b894491426c07fe816a48fec39dd18dfdb8d8069f7ebf73e2e
BLAKE2b-256 checksum
How to use checksums
bcc169a6a2799198750228514fcf24d5cba86af50589bbd72351e0a75fc5d471
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for abstract-security 0.84

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.84 This release

2 release files No provenance

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