This repo is used as a part of a tutorial to show how to use Fastapi and pydantic with Sqlalchemy, postgresql, Alembic(for migrations).
The full article is published on medium here
docker-compose build
docker-compose up
and go to:
http://localhost:8000
swagger - http://localhost:8000/docs
redoc - http://localhost:8000/redoc
http://localhost:5050
Bumps setuptools from 59.5.0 to 65.5.1.
Sourced from setuptools's releases.
v65.5.1
No release notes provided.
v65.5.0
No release notes provided.
v65.4.1
No release notes provided.
v65.4.0
No release notes provided.
v65.3.0
No release notes provided.
v65.2.0
No release notes provided.
v65.1.1
No release notes provided.
v65.1.0
No release notes provided.
v65.0.2
No release notes provided.
v65.0.1
No release notes provided.
v65.0.0
No release notes provided.
v64.0.3
No release notes provided.
v64.0.2
No release notes provided.
v64.0.1
No release notes provided.
v64.0.0
No release notes provided.
v63.4.3
No release notes provided.
v63.4.2
No release notes provided.
... (truncated)
Sourced from setuptools's changelog.
v65.5.1
Misc ^^^^
- #3638: Drop a test dependency on the
mock
package, always use :external+python:py:mod:unittest.mock
-- by :user:hroncok
- #3659: Fixed REDoS vector in package_index.
v65.5.0
Changes ^^^^^^^
- #3624: Fixed editable install for multi-module/no-package
src
-layout projects.- #3626: Minor refactorings to support distutils using stdlib logging module.
Documentation changes ^^^^^^^^^^^^^^^^^^^^^
- #3419: Updated the example version numbers to be compliant with PEP-440 on the "Specifying Your Projectβs Version" page of the user guide.
Misc ^^^^
- #3569: Improved information about conflicting entries in the current working directory and editable install (in documentation and as an informational warning).
- #3576: Updated version of
validate_pyproject
.v65.4.1
Misc ^^^^
- #3613: Fixed encoding errors in
expand.StaticModule
when system default encoding doesn't match expectations for source files.- #3617: Merge with pypa/[email protected] including fix for pypa/distutils#181.
v65.4.0
Changes ^^^^^^^
- #3609: Merge with pypa/[email protected] including support for DIST_EXTRA_CONFIG in pypa/distutils#177.
v65.3.0
... (truncated)
a462cb5
Bump version: 65.5.0 β 65.5.1de35d8b
Merge pull request #3656 from bmorris3/typos58e23de
Update changelog. Ref #3659.43a9c9b
Limit the amount of whitespace to search/backtrack. Fixes #3659.5791343
Add test capturing failed expectation. Ref #3659.1f97905
β« Fade to black.6254567
Remove workaround for emacs.729b180
β« Fade to black.c068081
Typo correctionsf777a40
Suppress deprecation warning in --rsyncdir. Workaround for #3655.Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps mako from 1.1.6 to 1.2.2.
Sourced from mako's releases.
1.2.2
Released: Mon Aug 29 2022
bug
[bug] [lexer] Fixed issue in lexer where the regexp used to match tags would not correctly interpret quoted sections individually. While this parsing issue still produced the same expected tag structure later on, the mis-handling of quoted sections was also subject to a regexp crash if a tag had a large number of quotes within its quoted sections.
References: #366
1.2.1
Released: Thu Jun 30 2022
bug
[bug] [tests] Various fixes to the test suite in the area of exception message rendering to accommodate for variability in Python versions as well as Pygments.
References: #360
misc
[performance] Optimized some codepaths within the lexer/Python code generation process, improving performance for generation of templates prior to their being cached. Pull request courtesy Takuto Ikuta.
References: #361
1.2.0
Released: Thu Mar 10 2022
changed
[changed] [py3k] Corrected "universal wheel" directive in
setup.cfg
so that building a wheel does not target Python 2.References: #351
[changed] [py3k] The
bytestring_passthrough
template argument is removed, as this flag only applied to Python 2.
... (truncated)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps ipython from 7.13.0 to 7.16.3.
d43c7c7
release 7.16.35fa1e40
Merge pull request from GHSA-pq7m-3gw7-gq5x8df8971
back to dev9f477b7
release 7.16.2138f266
bring back release helper from master branch5aa3634
Merge pull request #13341 from meeseeksmachine/auto-backport-of-pr-13335-on-7...bcae8e0
Backport PR #13335: What's new 7.16.28fcdcd3
Pin Jedi to <0.17.2.2486838
release 7.16.120bdc6f
fix conda buildDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
https://github.com/encode/databases/issues/31
https://github.com/ahmednafies/fastapi_sqlalchemy_alembic/blob/c97cca7438faaf20bddf7451f34561b193fdf57f/main.py#L16
The more appropriate way to refer to configuration in environment in FastAPI is via pydantic.BaseConfig
. If I am not mistaken that is how FastAPI does things for itself.
https://github.com/ahmednafies/fastapi_sqlalchemy_alembic/blob/c97cca7438faaf20bddf7451f34561b193fdf57f/main.py#L20
If the database is down or the database call is slow for any reason your website will be down. This is a self inflicted DoS. The async keyword should not be used here.
SQLalchemy doesn't support asycio yet. See Databases or GINO for async wrappers around SQL Alchemy.
Otherwise, thanks for the boilerplate.