Coder Social home page Coder Social logo

rdwz / simple-stack-fastapi-edgedb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kurtrottmann/simple-stack-fastapi-edgedb

0.0 0.0 0.0 136 KB

This is an alternative version of full-stack-fastapi-postgresql but using EdgeDB.

License: MIT License

Shell 1.01% JavaScript 0.89% Python 32.44% TypeScript 20.47% HTML 13.63% Vue 30.85% Dockerfile 0.71%

simple-stack-fastapi-edgedb's Introduction

simple-stack-fastapi-edgedb

This is an alternative version of full-stack-fastapi-postgresql but using EdgeDB.

SQLALchemy ORM was replaced by async queries using the EdgeDB Python driver.

I tried to simplify the backend folder structure and also removed Cookiecutter, Traefik, Celery, PGAdmin and Sentry related stuff.

The frontend is the same as the original project except for a little change to work with UUIDs.

Instructions

Clone the repository:

git clone https://github.com/kurtrottmann/simple-stack-fastapi-edgedb.git
cd simple-stack-fastapi-edgedb

Start the development stack with Docker Compose:

docker-compose up -d

To check if the backend and database is up:

docker-compose logs backend

Then you can access to:

Default credentials:

If you have EdgeDB CLI installed, you can access the containerized DB with:

 edgedb -u edgedb

Pagination

For pagination use the offset and limit query parameters. Example:

http://localhost:8000/api/v1/users/?offset=20&limit=1000

Ordering

The query parameter is ordering and the allowed order fields are defined in schemas.py. You can specify multiple order fields separated by commas. For reverse ordering, prefix the field name with '-'. Example:

http://localhost:8000/api/v1/users/?ordering=email,-num_items

Filtering

The allowed filter fields are defined in schemas.py. You can specify nested filtering fields using the '__' separator. Example:

http://localhost:8000/api/v1/items/?[email protected]

Changelog

0.2

  • Add Docker Compose.
  • Add REST API ordering.
  • Add REST API filtering.
  • Update to EdgeDB 1.0 Alpha 6.

0.1

  • Initial Release

simple-stack-fastapi-edgedb's People

Contributors

kurtrottmann avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.