thalesbruno / fastapi-boilerplate Goto Github PK
View Code? Open in Web Editor NEWA FastAPI boilerplate application
A FastAPI boilerplate application
Create a new module and put there all the dependencies (DB session and oauth2 password by now)
Create thetest_app
database during the images build process
The tests will fail at the first time we run docker-compose up
, because the creation of test_app
database is not present in the images build process.
At the moment, we need to execute the command below to create it
docker exec fastapi-boilerplate_db_1 psql -U app -c "create database test_app with owner app;"
To drop:
docker exec fastapi-boilerplate_db_1 psql -U app -c "drop database test_app;"
The unit tests that use the email service are failing because there is no SMTP server running in the test scenario.
tests_1 | E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server: Connection refused
tests_1 | E Is the server running on host "db_test" (172.22.0.3) and accepting
tests_1 | E TCP/IP connections on port 5432?
tests_1 | E
tests_1 | E (Background on this error at: http://sqlalche.me/e/13/e3q8)
@router.get("/users/{user_id}", response_model=schemas.User, tags=['users'])
def read_user(user_id: int, db: Session = Depends(get_db)):
db_user = crud.get_user(db=db, user_id=user_id)
if db_user is None:
> raise HTTPException(status_code=404, detail="User not found")
return db_user
Create a change password function
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.