# fideslib
[![Latest Version][pypi-image]][pypi-url]
[![License][license-image]][license-url]
[![Code style: black][black-image]][black-url]
[![Checked with mypy][mypy-image]][mypy-url]
[![Twitter][twitter-image]][twitter-url]
## Installation
```console
pip install fideslib
```
## Usage
### Config
Examples here will assume a project structure of `src/my_project` where `my_project` is
the root module.
To use the default config settings create a module and file to store the config. In
this example we will use `src/my_project/core/config.py`.
```py
from fideslib.core.config import get_config
config = get_config()
```
Then the config can be used in other files by importing `config`.
```py
from my_project.core.config import config
```
The default config can be overridden by extending the settings classes. With the same
setup as above, in the `src/my_project/core/config.py` file:
```py
from fideslib.core.config import DatabaseSettings, FidesSettings, get_config
class ExtendedDataBaseSettings(DatabaseSettings):
extra_field: str
class Config:
env_prefix = "FIDESOPS__DATABASE__"
class ExtendedFidesSettings(FidesSettings):
database: ExtendedDataBaseSettings
config = get_config(ExtendedDataBaseSettings) # pass the name of the custom settings class here
```
Now the resulting `config.database` will contain the extra `extra_field` field and
`ExtendedDataBaseSettings` will look for environment variables with
`FIDESOBS__DATABASE__`.
## Contributing
We welcome and encourage all types of contributions and improvements!
Read about the [Fides community](https://ethyca.github.io/fides/community/hints_tips/) or dive into the [development guides](https://ethyca.github.io/fides/development/overview) for information about contributions, documentation, code style, testing, and more. Ethyca is committed to fostering a safe and collaborative environment, such that all interactions are governed by the [Fides Code of Conduct](https://ethyca.github.io/fides/community/code_of_conduct/).
## License
The Fides ecosystem of tools are licensed under the [Apache Software License Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).
Fides tools are built on [Fideslang](https://github.com/ethyca/privacy-taxonomy), the Fides language specification, which is licensed under [CC by 4](https://github.com/ethyca/privacy-taxonomy/blob/main/LICENSE).
Fides is created and sponsored by [Ethyca](https://ethyca.com/): a developer tools company building the trust infrastructure of the internet. If you have questions or need assistance getting started, let us know at fides@ethyca.com!
[pypi-image]: https://img.shields.io/pypi/v/fideslib.svg
[pypi-url]: https://pypi.python.org/pypi/fideslib/
[license-image]: https://img.shields.io/:license-Apache%202-blue.svg
[license-url]: https://www.apache.org/licenses/LICENSE-2.0.txt
[black-image]: https://img.shields.io/badge/code%20style-black-000000.svg
[black-url]: https://github.com/psf/black/
[mypy-image]: http://www.mypy-lang.org/static/mypy_badge.svg
[mypy-url]: http://mypy-lang.org/
[twitter-image]: https://img.shields.io/twitter/follow/ethyca?style=social
[twitter-url]: https://twitter.com/ethyca
Raw data
{
"_id": null,
"home_page": "https://github.com/ethyca/fideslib",
"name": "fideslib",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8, <4",
"maintainer_email": "",
"keywords": "",
"author": "Ethyca, Inc.",
"author_email": "fidesteam@ethyca.com",
"download_url": "https://files.pythonhosted.org/packages/e4/bf/200fc6dc6f3366ac52c7fda690de70cd8f88a9ee941f96d450badb143866/fideslib-3.1.5.tar.gz",
"platform": null,
"description": "# fideslib\n\n[![Latest Version][pypi-image]][pypi-url]\n[![License][license-image]][license-url]\n[![Code style: black][black-image]][black-url]\n[![Checked with mypy][mypy-image]][mypy-url]\n[![Twitter][twitter-image]][twitter-url]\n\n## Installation\n\n```console\npip install fideslib\n```\n\n\n## Usage\n\n### Config\n\nExamples here will assume a project structure of `src/my_project` where `my_project` is\nthe root module.\n\nTo use the default config settings create a module and file to store the config. In\nthis example we will use `src/my_project/core/config.py`.\n\n\n```py\nfrom fideslib.core.config import get_config\n\nconfig = get_config()\n```\n\nThen the config can be used in other files by importing `config`.\n\n```py\nfrom my_project.core.config import config\n```\n\nThe default config can be overridden by extending the settings classes. With the same\nsetup as above, in the `src/my_project/core/config.py` file:\n\n```py\nfrom fideslib.core.config import DatabaseSettings, FidesSettings, get_config\n\n\nclass ExtendedDataBaseSettings(DatabaseSettings):\n extra_field: str\n\n class Config:\n env_prefix = \"FIDESOPS__DATABASE__\"\n\n\nclass ExtendedFidesSettings(FidesSettings):\n database: ExtendedDataBaseSettings\n\n\nconfig = get_config(ExtendedDataBaseSettings) # pass the name of the custom settings class here\n```\n\nNow the resulting `config.database` will contain the extra `extra_field` field and\n`ExtendedDataBaseSettings` will look for environment variables with\n`FIDESOBS__DATABASE__`.\n\n## Contributing\n\nWe welcome and encourage all types of contributions and improvements!\n\nRead about the [Fides community](https://ethyca.github.io/fides/community/hints_tips/) or dive into the [development guides](https://ethyca.github.io/fides/development/overview) for information about contributions, documentation, code style, testing, and more. Ethyca is committed to fostering a safe and collaborative environment, such that all interactions are governed by the [Fides Code of Conduct](https://ethyca.github.io/fides/community/code_of_conduct/).\n\n## License\n\nThe Fides ecosystem of tools are licensed under the [Apache Software License Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).\nFides tools are built on [Fideslang](https://github.com/ethyca/privacy-taxonomy), the Fides language specification, which is licensed under [CC by 4](https://github.com/ethyca/privacy-taxonomy/blob/main/LICENSE).\n\nFides is created and sponsored by [Ethyca](https://ethyca.com/): a developer tools company building the trust infrastructure of the internet. If you have questions or need assistance getting started, let us know at fides@ethyca.com!\n\n[pypi-image]: https://img.shields.io/pypi/v/fideslib.svg\n[pypi-url]: https://pypi.python.org/pypi/fideslib/\n[license-image]: https://img.shields.io/:license-Apache%202-blue.svg\n[license-url]: https://www.apache.org/licenses/LICENSE-2.0.txt\n[black-image]: https://img.shields.io/badge/code%20style-black-000000.svg\n[black-url]: https://github.com/psf/black/\n[mypy-image]: http://www.mypy-lang.org/static/mypy_badge.svg\n[mypy-url]: http://mypy-lang.org/\n[twitter-image]: https://img.shields.io/twitter/follow/ethyca?style=social\n[twitter-url]: https://twitter.com/ethyca",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "Shared libraries, for use in any fides project.",
"version": "3.1.5",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "ee2d846586e00c6bf085842439e7e1fb",
"sha256": "407b3be27c78c3638fd77fe0a736e0614a3ef9fae3de137a55dc4fdf68cfb03b"
},
"downloads": -1,
"filename": "fideslib-3.1.5.tar.gz",
"has_sig": false,
"md5_digest": "ee2d846586e00c6bf085842439e7e1fb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8, <4",
"size": 28554,
"upload_time": "2022-11-02T12:29:00",
"upload_time_iso_8601": "2022-11-02T12:29:00.614221Z",
"url": "https://files.pythonhosted.org/packages/e4/bf/200fc6dc6f3366ac52c7fda690de70cd8f88a9ee941f96d450badb143866/fideslib-3.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-11-02 12:29:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "ethyca",
"github_project": "fideslib",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "alembic",
"specs": [
[
">=",
"1.6.5"
]
]
},
{
"name": "bcrypt",
"specs": [
[
">=",
"3.2.0"
]
]
},
{
"name": "fastapi",
"specs": [
[
">=",
"0.70.0"
]
]
},
{
"name": "fastapi-pagination",
"specs": [
[
">=",
"0.8.3"
]
]
},
{
"name": "fideslang",
"specs": [
[
">=",
"0.9.0"
]
]
},
{
"name": "psycopg2-binary",
"specs": [
[
">=",
"2.9.1"
]
]
},
{
"name": "python-jose",
"specs": [
[
">=",
"3.3.0"
]
]
},
{
"name": "SQLAlchemy",
"specs": [
[
">=",
"1.4.14"
]
]
},
{
"name": "SQLAlchemy-Utils",
"specs": [
[
">=",
"0.37.8"
]
]
},
{
"name": "tomli",
"specs": [
[
">=",
"1.2.3"
]
]
},
{
"name": "Unidecode",
"specs": [
[
">=",
"1.2.0"
]
]
},
{
"name": "validators",
"specs": [
[
">=",
"0.20.0"
]
]
}
],
"lcname": "fideslib"
}