pydantic-settings-external


Namepydantic-settings-external JSON
Version 0.1.0 PyPI version JSON
download
home_page
SummaryPyDantic Settings External is a library that extends PyDantic Settings to support various types of external configuration providers, such as GCP Secret Manager and AWS Secrets Manager. PyDantic Settings External has been developed using a clear abstraction, allowing for easy extension to external configurations not yet incorporated into the library by the community.
upload_time2023-08-08 18:09:17
maintainer
docs_urlNone
author
requires_python>=3.8
license
keywords pydantic pydantic-settings
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pydantic Settings External

## The project is currently under active development.

Pydantic Settings External extends Pydantic Settings to support various types of external configuration providers, such as GCP Secret Manager and AWS Secrets Manager. PyDantic Settings External has been developed using a clear abstraction, allowing for easy extension to external providers.

Installation:

```bash
pip install pydantic-settings-external
```

Usage example with `with_settings_external` helper

Pydantic v2.x

```bash
pip install pydantic
pip install pydantic-settings-external
pip install pydantic-settings
```

```python

from pydantic import Field
from pydantic_settings_external import BaseSettings


gcp = GCPProvider(...)
one_password = OnePasswordProvider(...)


class Settings(BaseSettings):
    SENDGRID_API_KEY: str = Field(..., json_schema_extra={
        "provider": {
            "instance": gcp,
            "options": {"name": "sendgrid-api-key", "vesion": "latest"},
            "hint": "The optional hint will be displayed if the secret couldn't be retrieved for any reason.",
        },
    })
    ADMIN_USER: str = Field(..., json_schema_extra={
        "provider": {
            "instance": one_password,
            "options": {"field": "user", "vault": "admin_credentials"},
        },
    })

settings = Settings()

```

Pydantic v1.10.x

```bash
pip install "pydantic>=1.10,<2"
pip install pydantic-settings-external
```

NOTE: For Pydantic v1.10.x replace `json_schema_extra` with `extra`.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pydantic-settings-external",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "pydantic,pydantic-settings",
    "author": "",
    "author_email": "Ali Aliyev <ali@aliev.me>",
    "download_url": "https://files.pythonhosted.org/packages/55/3c/529c9f1391a61c8720e7e8af8f14b84378c459299fbd1386221b5809f5b1/pydantic-settings-external-0.1.0.tar.gz",
    "platform": null,
    "description": "# Pydantic Settings External\n\n## The project is currently under active development.\n\nPydantic Settings External extends Pydantic Settings to support various types of external configuration providers, such as GCP Secret Manager and AWS Secrets Manager. PyDantic Settings External has been developed using a clear abstraction, allowing for easy extension to external providers.\n\nInstallation:\n\n```bash\npip install pydantic-settings-external\n```\n\nUsage example with `with_settings_external` helper\n\nPydantic v2.x\n\n```bash\npip install pydantic\npip install pydantic-settings-external\npip install pydantic-settings\n```\n\n```python\n\nfrom pydantic import Field\nfrom pydantic_settings_external import BaseSettings\n\n\ngcp = GCPProvider(...)\none_password = OnePasswordProvider(...)\n\n\nclass Settings(BaseSettings):\n    SENDGRID_API_KEY: str = Field(..., json_schema_extra={\n        \"provider\": {\n            \"instance\": gcp,\n            \"options\": {\"name\": \"sendgrid-api-key\", \"vesion\": \"latest\"},\n            \"hint\": \"The optional hint will be displayed if the secret couldn't be retrieved for any reason.\",\n        },\n    })\n    ADMIN_USER: str = Field(..., json_schema_extra={\n        \"provider\": {\n            \"instance\": one_password,\n            \"options\": {\"field\": \"user\", \"vault\": \"admin_credentials\"},\n        },\n    })\n\nsettings = Settings()\n\n```\n\nPydantic v1.10.x\n\n```bash\npip install \"pydantic>=1.10,<2\"\npip install pydantic-settings-external\n```\n\nNOTE: For Pydantic v1.10.x replace `json_schema_extra` with `extra`.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "PyDantic Settings External is a library that extends PyDantic Settings to support various types of external configuration providers, such as GCP Secret Manager and AWS Secrets Manager. PyDantic Settings External has been developed using a clear abstraction, allowing for easy extension to external configurations not yet incorporated into the library by the community.",
    "version": "0.1.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/aliev/pydantic-settings-external/issues",
        "Homepage": "https://github.com/aliev/pydantic-settings-external"
    },
    "split_keywords": [
        "pydantic",
        "pydantic-settings"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "954089005ca101e2bbbf8260d8f29f416345918e497936a658f26826ea27e0cf",
                "md5": "eb358d80f8e3b4cc3d6fe6a7cbc440b5",
                "sha256": "86166e2b1bc406879f7e97a8d30ad6573fbd4107bd1ebe3b36a483909c3a4a0c"
            },
            "downloads": -1,
            "filename": "pydantic_settings_external-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eb358d80f8e3b4cc3d6fe6a7cbc440b5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7986,
            "upload_time": "2023-08-08T18:09:15",
            "upload_time_iso_8601": "2023-08-08T18:09:15.697407Z",
            "url": "https://files.pythonhosted.org/packages/95/40/89005ca101e2bbbf8260d8f29f416345918e497936a658f26826ea27e0cf/pydantic_settings_external-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "553c529c9f1391a61c8720e7e8af8f14b84378c459299fbd1386221b5809f5b1",
                "md5": "dff2e821b8690c61e53aa74e642f72dd",
                "sha256": "da31a4914cda2b5fbd15873f0e8287f7b38347087537299737608f4d28d33508"
            },
            "downloads": -1,
            "filename": "pydantic-settings-external-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "dff2e821b8690c61e53aa74e642f72dd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 6306,
            "upload_time": "2023-08-08T18:09:17",
            "upload_time_iso_8601": "2023-08-08T18:09:17.414706Z",
            "url": "https://files.pythonhosted.org/packages/55/3c/529c9f1391a61c8720e7e8af8f14b84378c459299fbd1386221b5809f5b1/pydantic-settings-external-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-08 18:09:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aliev",
    "github_project": "pydantic-settings-external",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pydantic-settings-external"
}
        
Elapsed time: 0.15527s