An implementation of the JSON:API Standard in Python.
Project description
Python JSON:API Standard (PyJAS)
PyJAS is a Python library that provides seamless integration of the JSON:API specification with Pydantic and FastAPI. It simplifies the process of building standards-compliant APIs, ensuring consistency and interoperability across your applications.
Features
- Standards Compliance: Adheres strictly to the JSON:API specification.
- Pydantic Models: Utilizes Pydantic for data validation and serialization.
- FastAPI Integration: Easily integrates with FastAPI to build high-performance APIs.
- Flexible Configuration: Customize behaviors to fit your project's requirements.
- Extensible: Supports extensions and customizations for advanced use cases.
Installation
You can install PyJAS via pip:
pip install pyjas
Quick Start
Here's a simple example of how to integrate PyJAS with Pydantic & FastAPI:
from fastapi import FastAPI
from pyjas.v1_1 import Document, ResourceObject
app = FastAPI()
class Article(ResourceObject):
type_: str = "articles"
id_: str
attributes: dict
@app.get("/articles/{article_id}", response_model=Document)
async def get_article(article_id: str):
article = Article(id_=article_id, attributes={"title": "PyJAS"})
return Document(data=article)
For a complete example, visit our Documentation Site.
Documentation
Comprehensive documentation is available on our MkDocs site.
Contributing
Contributions are welcome! Please see our Contributing Guide for more information.
License
This project is licensed under the MIT License.
Contact
For questions or support, please open an issue on GitHub.
Acknowledgements
- Inspired by the JSON specification.
- Built using Pydantic & FastAPI.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyjas-0.2.2.tar.gz.
File metadata
- Download URL: pyjas-0.2.2.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02ff7f80c9eaf6468f7a3896f37fec8f88c20446088f0c0bad3be99a29e19ff6
|
|
| MD5 |
90b81ca42656f42d7764ab191e3be641
|
|
| BLAKE2b-256 |
82f2e49a902f65e74e7976e6df9208c3a5432fa6b58fa76afafca1756c5b3e3c
|
Provenance
The following attestation bundles were made for pyjas-0.2.2.tar.gz:
Publisher:
publish.yml on kmbhm1/PyJAS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyjas-0.2.2.tar.gz -
Subject digest:
02ff7f80c9eaf6468f7a3896f37fec8f88c20446088f0c0bad3be99a29e19ff6 - Sigstore transparency entry: 162945534
- Sigstore integration time:
-
Permalink:
kmbhm1/PyJAS@d5969f2fa5138032debc4f6d5c2a6162b02ed11f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kmbhm1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d5969f2fa5138032debc4f6d5c2a6162b02ed11f -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyjas-0.2.2-py3-none-any.whl.
File metadata
- Download URL: pyjas-0.2.2-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d034e9b83f58817994c1608ea138806e6f76a1ddf75a6b7d479ddf914a3a16b5
|
|
| MD5 |
8ede79da6e4e7dd5ffbfac33a52891e3
|
|
| BLAKE2b-256 |
8516f9f765ac06cb5ee29281e57f9a6e436e55a417b4a55da73e99dead6a20aa
|
Provenance
The following attestation bundles were made for pyjas-0.2.2-py3-none-any.whl:
Publisher:
publish.yml on kmbhm1/PyJAS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyjas-0.2.2-py3-none-any.whl -
Subject digest:
d034e9b83f58817994c1608ea138806e6f76a1ddf75a6b7d479ddf914a3a16b5 - Sigstore transparency entry: 162945535
- Sigstore integration time:
-
Permalink:
kmbhm1/PyJAS@d5969f2fa5138032debc4f6d5c2a6162b02ed11f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kmbhm1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d5969f2fa5138032debc4f6d5c2a6162b02ed11f -
Trigger Event:
push
-
Statement type: