Skip to main content

aneSettings

pypi

aneSettings is a framework for developing scalable applications. It offers a set of core libraries and utilities to streamline the development workflow, enforce security best practices, and improve code maintainability. By supporting modern programming paradigms, it allows developers to build robust and efficient solutions with reduced overhead.

Key Features:

  • Security-First Approach: Built-in security measures to prevent common vulnerabilities.
  • Scalability: Optimized to handle high loads and large-scale applications.
  • Modularity: Highly modular architecture, allowing seamless integration and customization.
  • Ease of Use: Developer-friendly APIs and comprehensive documentation.

Goals:

  • Accelerate development time while maintaining high code quality.
  • Provide a flexible foundation to meet diverse application needs.
  • Ensure application security without compromising performance.

Core Components:

  • ConfigSettings: Handles configuration and settings management
  • CustomLogging: Provides customized logging functionality
  • Encryption: Offers encryption-related utilities
  • ProjectRoot: Manages project root detection and path resolution

ConfigSettings:

# Basic Logging and Config Settings
from aneSettings import logger, config

# Constants
FORMAT_PADDING = 25
SEPARATOR_LINE = "-" * 150


def log_sorted_settings(system_settings):
    """Logs the key-value pairs of sorted settings."""
    for setting_name, setting_value in system_settings:
        logger.info(f'{setting_name:>{FORMAT_PADDING}}: {setting_value}')


if __name__ == '__main__':
    # -------------------------------------------------------------------------------------------------
    # Example of viewing and sorting configuration settings
    # -------------------------------------------------------------------------------------------------
    logger.info(SEPARATOR_LINE)
    sorted_settings = sorted(config)
    log_sorted_settings(sorted_settings)

output

aneSettings | INFO     | ------------------------------------------------------------------------------------------------------------------------------------------------------
aneSettings | INFO     |               ENVIRONMENT: Local
aneSettings | INFO     |                    FN_KEY: pit...-iM2c=
aneSettings | INFO     |               LOG_APPNAME: aneSettings
aneSettings | INFO     |                LOG_FORMAT: {extra[app]} | <level>{level: <8}</level> | <cyan><level>{message}</level></cyan>
aneSettings | INFO     |                 LOG_LEVEL: DEBUG
aneSettings | INFO     |            MSSQL_DATABASE: {default_database}
aneSettings | INFO     |            MSSQL_HOSTNAME: {hostname}
aneSettings | INFO     |            MSSQL_PASSWORD: {password}
aneSettings | INFO     |                MSSQL_PORT: {port}
aneSettings | INFO     |               MSSQL_TRUST: {trust}
aneSettings | INFO     |            MSSQL_USERNAME: {username}
aneSettings | INFO     |              PROJECT_ROOT: /{project_root}/aneSettings
aneSettings | INFO     |              VERSION_CORE: 2025.9.0

Encryption:

# Basic Logging and Encryption
from aneSettings import logger, encryption_service

# Constants
FORMAT_PADDING = 25
SEPARATOR_LINE = "-" * 150


def log_formatted(key, value):
    """Helper to standardize log output."""
    logger.info(f'{key:>{FORMAT_PADDING}}: {value}')


if __name__ == '__main__':
    # -------------------------------------------------------------------------------------------------
    # Example of Encryption Usage
    # -------------------------------------------------------------------------------------------------

    # Data: set and show values
    logger.info(SEPARATOR_LINE)
    secret_data = "Sensitive Information"
    log_formatted(key="Data", value=secret_data)
    encryption_key = encryption_service.key.decode()
    log_formatted(key="Key", value=encryption_key)

    # Encryption: encrypt and decrypt
    logger.info(SEPARATOR_LINE)
    encrypted = encryption_service.encrypt(secret_data)
    log_formatted(key="Encryption successful", value=f"{encrypted != secret_data} - {encrypted.decode()}")

    decrypted = encryption_service.decrypt(encrypted)
    log_formatted(key="Decryption successful", value=f"{decrypted == secret_data} - {decrypted}")

    # Base64: encode and decode
    logger.info(SEPARATOR_LINE)
    b64_encoded = encryption_service.base64_encode(secret_data)
    log_formatted(key="Encode successful", value=f"{b64_encoded != secret_data} - {b64_encoded}")

    b64_decoded = encryption_service.base64_decode(b64_encoded)
    log_formatted(key="Decode successful", value=f"{b64_decoded == secret_data} - {b64_decoded}")

    # Generate a new key to replace the one in .env.settings `fn_key`
    logger.info(SEPARATOR_LINE)
    new_fn_key = encryption_service.generate_fernet_key().decode()
    log_formatted(key="New fn_key", value=f"{new_fn_key}")
    log_formatted(key="", value="Use this key to replace the one in .env.settings `fn_key`")

    logger.info(SEPARATOR_LINE)

output

aneSettings | INFO     | ------------------------------------------------------------------------------------------------------------------------------------------------------
aneSettings | INFO     |                      Data: Sensitive Information
aneSettings | INFO     |                       Key: pitANnjVW1OX2LuVqrWw1H2b69wCewmdARQzr6-iM2c=
aneSettings | INFO     | ------------------------------------------------------------------------------------------------------------------------------------------------------
aneSettings | INFO     |     Encryption successful: True - gAAAAABox0DLjm7IOmFNRio8FYnp5tLVtMqPFpx5qFbbeot_jIUNah8XqLqHhPNmvaw1HpIBe0ebsna7ou8BrVnQ9erv6Fr1VK_O7PC3xDDXQXSEnyA2WhE=
aneSettings | INFO     |     Decryption successful: True - Sensitive Information
aneSettings | INFO     | ------------------------------------------------------------------------------------------------------------------------------------------------------
aneSettings | INFO     |         Encode successful: True - U2Vuc2l0aXZlIEluZm9ybWF0aW9u
aneSettings | INFO     |         Decode successful: True - Sensitive Information
aneSettings | INFO     | ------------------------------------------------------------------------------------------------------------------------------------------------------
aneSettings | INFO     |                New fn_key: RAl2XHZUwXQyZwXdzwVWJGKDDSwyJluh41De9KHw9oI=
aneSettings | INFO     |                          : Use this key to replace the one in .env.settings `fn_key`

ProjectRoot:

# Basic Logging and Project Path Operations
from aneSettings import logger, project_root

# Constants
FORMAT_PADDING = 25
SEPARATOR_LINE = "-" * 150


def log_formatted(key, value):
    """Helper to standardize log output."""
    logger.info(f'{key:>{FORMAT_PADDING}}: {value}')


if __name__ == "__main__":
    # -------------------------------------------------------------------------------------------------
    # Example of Project Path Operations
    # -------------------------------------------------------------------------------------------------

    # Get project-related paths
    root_path = project_root
    config_path = project_root / "config"
    data_path = project_root / "data"

    logger.info(SEPARATOR_LINE)
    log_formatted(key="Project root", value=root_path)
    log_formatted(key="Config path", value=config_path)
    log_formatted(key="Data path", value=data_path)
    logger.info(SEPARATOR_LINE)

output

aneSettings | INFO     | ------------------------------------------------------------------------------------------------------------------------------------------------------
aneSettings | INFO     |              Project root: {project_root}
aneSettings | INFO     |               Config path: {project_root}/config
aneSettings | INFO     |                 Data path: {project_root}/data
aneSettings | INFO     | ------------------------------------------------------------------------------------------------------------------------------------------------------

Metadata

Release files for aneSettings 2026.8.0

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

Source distribution (sdist)

Source distribution for aneSettings 2026.8.0
File Size Uploaded Provenance Actions
anesettings-2026.8.0.tar.gz 17.6 kB Without provenance Details for anesettings-2026.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aneSettings 2026.8.0
File Interpreter ABI Platform Actions
anesettings-2026.8.0-py3-none-any.whl Python 3 none any Details for anesettings-2026.8.0-py3-none-any.whl

Total release size: 32.1 kB

Release files / anesettings-2026.8.0.tar.gz

Download URL anesettings-2026.8.0.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b6faa7ad551cbf1db426ec742145483b93b3c5082a4538e2198948202734b102
BLAKE2b-256 checksum
How to use checksums
ce4770d300d9e1c3ed1bc7c7d39ab2c4bf9d1a7dd6ddb80602ca5c767314115e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / anesettings-2026.8.0-py3-none-any.whl

Download URL anesettings-2026.8.0-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ebbdd652a7b41ea90dbeac2ae251f69012613c8dc1ef579054f7ca47fc87e18
BLAKE2b-256 checksum
How to use checksums
613e7b5068ca605722d0903c0cf9c46c0ecf840fd119c9872bca1820e0ec07df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for aneSettings 2026.8.0

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.

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