Skip to main content

Shared libraries, for use in any fides project.

Project description

fideslib

Latest Version License Code style: black Checked with mypy Twitter

Installation

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.

from fideslib.core.config import get_config

config = get_config()

Then the config can be used in other files by importing config.

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:

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 or dive into the development guides 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.

License

The Fides ecosystem of tools are licensed under the Apache Software License Version 2.0. Fides tools are built on Fideslang, the Fides language specification, which is licensed under CC by 4.

Fides is created and sponsored by Ethyca: 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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fideslib-3.0.2.tar.gz (27.9 kB view details)

Uploaded Source

File details

Details for the file fideslib-3.0.2.tar.gz.

File metadata

  • Download URL: fideslib-3.0.2.tar.gz
  • Upload date:
  • Size: 27.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for fideslib-3.0.2.tar.gz
Algorithm Hash digest
SHA256 c5dae5d108581a91564d25a2a3e103de448a780cc2bb8eeb6ec7b8da646c0fdc
MD5 c8b60d5a408d6c27d85bd7be800b63f7
BLAKE2b-256 d70705e77ae1aca37d60c8762aeda6feb1c204b2df222eda96c037f98a44c612

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page