Skip to main content

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

  1. Launch postgres and pgadmin via docker-compose docker-compose up --build.

  2. Keeping your containers running, open a new terminal with the root of this repo as the working directory. Install poetry: pip install poetry (or use pipx on link here if you prefer isolated envs, or consider using conda).

  3. Create and enter the virtual environment: poetry shell

  4. Install the dependencies poetry install

  5. Start the app: uvicorn examples.example_app:auto_app --reload.

  6. Open localhost:8000/v1/docs and start interacting with swagger!

  7. You can shut down and your db / minio data will persist via docker volumes.

pgAdmin

  • pgAdmin console is available at localhost:5050 if you launch via docker-compose. Login with email:user@test.com and password:admin. Make sure that you login to the server with hostname db in pgAdmin (under the "connection" tab in server properties). This is because the pgAdmin 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 to localhost. The user, password, and db name will all be postgres, port 5432.

Hooks and Tests

  1. Set up the precommit hook with pre-commit install.

  2. Run tests and get coverage with pytest --cov, and get html reports for vs code live server (or any server) with pytest --cov --cov-report=html:coverage_re

  3. 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

  1. Install docs dependencies with pip install -r requirements-docs.txt.
  2. Install mkdocs with pip install mkdocs-material.
  3. Move into the docs/en directory via cd docs/en.
  4. Run mkdocs serve to start a local server.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

instarest-0.0.13.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

instarest-0.0.13-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file instarest-0.0.13.tar.gz.

File metadata

  • Download URL: instarest-0.0.13.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.2 Linux/6.2.0-1018-azure

File hashes

Hashes for instarest-0.0.13.tar.gz
Algorithm Hash digest
SHA256 6ca43441f058c3f0a39cf4b80dc417492f70faa88da73ac5f0d25dfb3d52830a
MD5 06984191e5e66c7ef11ae01702229587
BLAKE2b-256 6d1401d5d4c31aa8b35daa6ad6df7806217a62423892fde1d015925f36f85a10

See more details on using hashes here.

File details

Details for the file instarest-0.0.13-py3-none-any.whl.

File metadata

  • Download URL: instarest-0.0.13-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.2 Linux/6.2.0-1018-azure

File hashes

Hashes for instarest-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 83aa443a4e8d4d80d8e984484fc6ec4f34932d748e3a84f0183af3f4de90d0e8
MD5 9bbb0cf2357932e8aae2223743e06ccc
BLAKE2b-256 afbf47b19ad9c595aa24f34163f9a68d30ed5f7c39ea09446c0626ba01ac6d3f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page