fastalchemy-0.1.3
توضیحات
A SQLAlchemy middleware for FastAPI
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | fastalchemy-0.1.3 |
| نام | fastalchemy |
| نسخه کتابخانه | 0.1.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Joseph Kim |
| ایمیل نویسنده | cloudeyes@gmail.com |
| آدرس صفحه اصلی | https://github.com/cloudeyes/fastalchemy |
| آدرس اینترنتی | https://pypi.org/project/fastalchemy/ |
| مجوز | MIT |
FastAlchemy
===========
[](https://travis-ci.com/cloudeyes/fastalchemy)
[](https://codecov.io/gh/cloudeyes/fastalchemy)
SQLAlchemy Middleware for [FastAPI](http://github.com/tiangolo/fastapi) inspired by the [official tutorial](https://fastapi.tiangolo.com/tutorial/sql-databases).
Install
--------
```
pip install fastapi fastalchemy
```
Features
--------
- Super-easy configuration: simply put `database.py` and `models.py` files in your project folder with the following code.
```python
from fastapi import FastAPI
from fastalchemy import SQLAlchemyMiddleware, db
from models import User
app = FastAPI()
app.add_middleware(SQLAlchemyMiddleware)
@app.get('/users')
def get_users():
return db.query(User).order_by(User.id).all()
```
Details
-------
Please peek `tests/app` folder if you want to know the way to create `database.py` and `models` py.
نحوه نصب
نصب پکیج whl fastalchemy-0.1.3:
pip install fastalchemy-0.1.3.whl
نصب پکیج tar.gz fastalchemy-0.1.3:
pip install fastalchemy-0.1.3.tar.gz