Fasteve is a rebuild of Eve using FastAPI as a base.
Fasteve is Simple
Create a file main.py with:
from fasteve import Fasteve, MongoModel, Resource
class People(MongoModel):
name: str
people = Resource(model=People)
resources = [people]
app = Fasteve(resources=resources)
Start a database (mongodb default):
$ docker run --rm -p 27017:27017 mongo
Run the server with:
$ uvicorn main:app --reload
The API is now live, ready to be consumed:
$ curl -i http://localhost:8000/people
HTTP/1.1 200
...
{
"_data": [],
"_meta": {"max_results": 25, "total": 0, "page": 1},
"_links": {
"self": {"href": "/people", "title": "people"},
"parent": {"href": "/", "title": "home"},
},
}
Features (TODO)
- Powered by FastAPI ✅
- Emphasis on REST ✅
- Full range of CRUD operations ✅
- Customizable resource endpoints ✅
- Sub Resources ✅
- Pagination ✅
- HATEOAS ✅
- Bulk create ✅
- Data Validation ✅
- Extensible Data Validation ✅
- Unique Fields ✅
- CORS Cross-Origin Resource Sharing ✅
- Read-only by default ✅
- Default Values ✅
- Embedded Resource Serialization ✅
- Event Hooks ✅
- Custom ID Fields ✅
- Alternative ID Fields ✅
- Interactive API docs (provided by Swagger UI) ✅
- Alternative API docs (provided by ReDoc) ✅
- Repeated Background Tasks ✅
- MongoDB Support ✅
- SQL Support ✅
- Predefined Database Filters
- Projections
- JSONP
- Customizable, multiple item endpoints
- Filtering and Sorting
- JSON and XML Rendering
- Conditional Requests
- Data Integrity and Concurrency Control
- Resource-level Cache Control
- API Versioning
- Document Versioning
- Authentication
- Rate Limiting
- File Storage
- GeoJSON
- Internal Resources
- Enhanced Logging
- Operations Log
- MongoDB Aggregation Framework
License
Fasteve is a open source project,
distributed under the BSD license
Latest Changes
- ✨ add SQL support via sqlmodel. PR #21 by @Wytamma.
- 🎉 v0.1.3. PR #20 by @Wytamma.
- ✨ Add event hooks. PR #17 by @Wytamma.
- ✨ break up endpoints. PR #16 by @Wytamma.
- ✨ Add PATCH method. PR #15 by @Wytamma.
- 🐛 PUT does upsert when ID not found. PR #14 by @Wytamma.
- 🎨 PUT returns 204 (No Content). PR #13 by @Wytamma.
- ✨ Add PUT method. PR #12 by @Wytamma.
- 🎨 Formatting with Black. PR #11 by @Wytamma.
Metadata
Release files for fasteve 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fasteve-0.2.3.tar.gz | 21.9 kB | Without provenance | Details for fasteve-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fasteve-0.2.3-py3-none-any.whl | Python 3 | none | any | Details for fasteve-0.2.3-py3-none-any.whl |
Total release size: 51.1 kB
Release files / fasteve-0.2.3.tar.gz
| Download URL | fasteve-0.2.3.tar.gz |
|---|---|
| Size | 21.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
210b72871920245e20c0bc6725bee341f4e14775cd411309ea82cbf904d30c19
|
|
BLAKE2b-256 checksum How to use checksums |
7960713211ff68105a463dc15c8707681eab07550fc4df99094fc42f3dfcb6b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.2 Linux/5.13.0-1021-azure
|
Release files / fasteve-0.2.3-py3-none-any.whl
| Download URL | fasteve-0.2.3-py3-none-any.whl |
|---|---|
| Size | 29.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c61b7afac3a2f0f0109339a09c6079df45b414aaeb0d219e59177952cc31069b
|
|
BLAKE2b-256 checksum How to use checksums |
a60521c85f884bc1442ef93f23c86479cb47f1fb6ab3f3b7cef546986aa4aff9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.2 Linux/5.13.0-1021-azure
|
Security for fasteve 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.