Declarative, instant REST APIs based on FastAPI, Pydantic, SQLAlchemy, and PostgreSQL
Project description
Getting Started
To get started with instarest
for your application, visit the docs at https://instarest.erob.io/
To contribute to instarest
, see the contributing section below.
Contributing
Getting Started Locally
-
Launch postgres and pgadmin via docker-compose
docker-compose up --build
. -
Keeping your containers running, open a new terminal with the root of this repo as the working directory. Install
poetry
:pip install poetry
(or usepipx
on link here if you prefer isolated envs, or consider usingconda
). -
Create and enter the virtual environment:
poetry shell
-
Install the dependencies
poetry install
-
Start the app:
uvicorn examples.example_app:auto_app --reload
. -
Open
localhost:8000/v1/docs
and start interacting with swagger! -
You can shut down and your db / minio data will persist via docker volumes.
pgAdmin
pgAdmin
console is available atlocalhost:5050
if you launch viadocker-compose
. Login with email:user@test.com
and password:admin
. Make sure that you login to the server with hostnamedb
inpgAdmin
(under the "connection" tab in server properties). This is because thepgAdmin
container is launched in the same docker network as the postgres container, so it uses the service name, whereas launching this app from command line uses port forwarding tolocalhost
. The user, password, and db name will all bepostgres
, port5432
.
Hooks and Tests
-
Set up the precommit hook with
pre-commit install
. -
Run tests and get coverage with
pytest --cov
, and get html reports for vs code live server (or any server) withpytest --cov --cov-report=html:coverage_re
-
Open a pull request against the repo! Please write tests, your coverage will automatically be added as a comment to any PR via GH actions.
Viewing Docs Locally
- Install docs dependencies with
pip install -r requirements-docs.txt
. - Install
mkdocs
withpip install mkdocs-material
. - Move into the
docs/en
directory viacd docs/en
. - Run
mkdocs serve
to start a local server.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for instarest-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c299b06d85de19751d561e820e8334297342bf3ee791e86013e313600e0df16 |
|
MD5 | b44da5552d94c0da5b5848d834a5ea51 |
|
BLAKE2b-256 | 90d48d26a29f368e339a729c4ef953ede204618e7d4ad604961abeeddedd7a3d |