Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Consider creating a ServerSettings configuration base class for FastAPI settings #59

Open
adamsachs opened this issue Jul 20, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@adamsachs
Copy link

adamsachs commented Jul 20, 2022

Is your feature request related to a specific problem?

Per some discussion on this fidesplus PR -- it may make sense to standardize/centralize basic FastAPI server settings that can be used across any different fides FastAPI apps.

Describe the solution you'd like

Similar to our DatabaseSettings and SecuritySettings base config classes currently defined in fideslib, we'd have a ServerSettings (not wedded to the name) that includes FastAPI server config properties. Using the fidesplus implementation referenced above, a starting point for config properties may look like:

class ServerSettings(Settings):
  host: str = Field("localhost")
  hot_reload: bool = Field(False, exclude=True)
  port: int = Field(8080)
  request_rate_limit: str = Field("100/minute")
@adamsachs adamsachs added the enhancement New feature or request label Jul 20, 2022
@sanders41
Copy link

Seems reasonable to me. Hot reload is available, but with a different name and location. We would just need to agree on the best name/location for that variable since it would be a breaking change in fidesops to move it and change the name.

Not all of the repos are using rate limiting so we would need to make that one optional, but that is easy enough.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants