Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First commit containing the base template for a Flask API #8

Merged
merged 2 commits into from
Sep 16, 2022

Conversation

chouinar
Copy link
Contributor

#3

Reviewed in navapbc/wic-mt-demo-project-mock-api#20

Just copying over the generic version from the above PR. This contains:

  • API with a post endpoint that writes to the DB using basic apikey authentication.
  • Postgres DB + alembic migrations configured for updating the DB when you update the sqlalchemy DB models.
  • Thorough formatting & linting tools.
  • Logging, with formatting in both human-readable and JSON formats.
  • Ability to write backend scripts connected to the DB with an example one that generates a CSV (locally or on S3 with proper credentials).
  • Ability to run the various utility scripts inside or outside of Docker (Note: I may need someone to test the outside as it requires installing a few libraries and/or configuring a few things that I need to document).
  • Restructured and improved API request and response error handling which gives more details than the out-of-the-box approach for both Connexion and Pydantic
  • Sane environment variable configuration for local development (local.env)

Copy link
Contributor

@rocketnova rocketnova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment. Otherwise LGTM!

Comment on lines 10 to 12
type: str # In the Mass code this is an enum, but lets keep it basic here
message: str = ""
rule: Optional[str] = None # Also an enum in Mass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's drop these comments

@chouinar chouinar merged commit 1339fa6 into main Sep 16, 2022
@chouinar chouinar deleted the chouinar/first-commit branch September 16, 2022 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants