Skip to main content

Build Status Coverage Badge

Dypendence

Dependency Injection over Dynaconf

Usage example

Example settings.toml

[DY.FileStorageService]
Type = "S3FileStorage"

[DY.FileStorageService.LocalFileStorage]
some_value = "This is Local File Storage"

[DY.FileStorageService.S3FileStorage]
some_value = "This is S3 File Storage"

Example application code:

from dypendence import DY


class FileStorageService(DY):

    def save_file(self) -> str:
        raise NotImplementedError
    
    def get_value_from_settings(self):
        return self.settings.some_value


class LocalFileStorage(FileStorageService):

    def save_file(self) -> str:
        return 'Saved file to local file system'


class S3FileStorage(FileStorageService):

    def save_file(self) -> str:
        return 'Saved file to S3-like storage'


if __name__ == '__main__':
    file_storage = FileStorageService(settings_files=['settings.toml'])

    assert isinstance(file_storage, S3FileStorage)
    assert file_storage.save_file() == 'Saved file to S3-like storage'
    assert file_storage.get_value_from_settings() == 'This is S3 File Storage'

Metadata

Release files for dypendence 0.1.6

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

Source distribution (sdist)

Source distribution for dypendence 0.1.6
File Size Uploaded Provenance Actions
dypendence-0.1.6.tar.gz 3.2 kB Without provenance Details for dypendence-0.1.6.tar.gz

Built distribution (wheel)

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

Total release size: 6.5 kB

Release files / dypendence-0.1.6.tar.gz

Download URL dypendence-0.1.6.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e5e19c03ba84a733701417a2d2c2408697d658973d3234b35ec5fcf1a7a628a4
BLAKE2b-256 checksum
How to use checksums
3d96b91e6bf7da1ae1f7edee1185db01b3ec68d574c03a4b3443a734802fc29b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.2 CPython/3.8.6 Linux/5.4.0-1026-azure

Release files / dypendence-0.1.6-py3-none-any.whl

Download URL dypendence-0.1.6-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
577178fd56346d660201fa2d0d30a906f5a53dde891d75d5b869961875550f95
BLAKE2b-256 checksum
How to use checksums
75ee6f6ea3e1205d853a6c843e40c792e673005ac810f5024458cf9a24ce72f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.2 CPython/3.8.6 Linux/5.4.0-1026-azure

Security for dypendence 0.1.6

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