Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kamilrybacki/phaistos
Transcribe human-readble, advanced YAML schemas into Pydantic models for data validation pipelines
https://github.com/kamilrybacki/phaistos
pydantic python3 reflections transpilation validation
Last synced: 12 days ago
JSON representation
Transcribe human-readble, advanced YAML schemas into Pydantic models for data validation pipelines
- Host: GitHub
- URL: https://github.com/kamilrybacki/phaistos
- Owner: kamilrybacki
- License: gpl-3.0
- Created: 2024-06-24T09:28:28.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-07-16T12:23:28.000Z (4 months ago)
- Last Synced: 2024-07-16T18:29:31.615Z (4 months ago)
- Topics: pydantic, python3, reflections, transpilation, validation
- Language: Python
- Homepage: https://phaistos.readthedocs.io/en/latest/
- Size: 1.95 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Phaistos
Transcribing schemas from YAML-infused tablets to magical Pydantic validation models π§ββοΈπ§ββοΈ
![Linting Status](https://github.com/kamilrybacki/Phaistos/actions/workflows/lint-code.yml/badge.svg)
![Testing Status](https://github.com/kamilrybacki/Phaistos/actions/workflows/code-tests.yml/badge.svg)
![Documentation Status](https://readthedocs.org/projects/phaistos/badge/?version=latest)## Main Features
The main goal of this project is to provide flexibility and utility in defining data models using YAML manifests,
to enforce data validation of objects such as ETL pipeline payloads, API requests and responses, configurations and more.These definitions are to be kept as easily versionable and maintainable files, which can be easily read and understood by
both developers and non-developers alike.The main features of Phaistos are:
* Define data models using YAML manifests for easy readability, versioning and maintainability ποΈ
* Add custom validators to data fields that are automatically injected into Pydantic models π**For installation and usage instructions, please refer to the [documentation].**
### Why Phaistos? (as in - why the name?)
The Phaistos name comes from the [Phaistos Disc], a disk of fired clay from the Minoan palace of Phaistos on the island of Crete, possibly dating to the middle or late Minoan Bronze Age (2nd millennium BC). These discs contain a series of symbols that are still undeciphered to this day.
In the show of unprecedented far-reaching, the resulting data models from Phaistos can be viewed as such "discs" containing malleable and abstract data validation dialects that can exist in a variety of forms and can be used to validate a variety of data payloads. Also - we used to burn data into disks π½, so there's another angle to the name. π€·ββοΈ
## Examples
The [`examples` folder] contains scripts and schemas that demonstrate how to use Phaistos to define and validate data models. The examples are written in Python and are intended to be run from the command line.
More information about the examples can be found in the [examples README].
Want more? You can check out tests in the `tests` directory for more examples of how to use Phaistos, however, expect some Python-fu and a lot of test-related code
e.g. monkey-patching, fixtures, etc. Viewer discretion is advised.## Contributing
Thank you for considering contributing to this project! We welcome contributions from everyone. By participating, you agree to abide by the following guidelines:
1. **Fork the Repository**: Start by forking the repository on GitHub.
2. **Clone Your Fork**: Clone your fork to your local machine.```sh
git clone https://github.com/your-username/your-fork.git
```3. **Create a Branch**: Create a feature branch for your work.
```sh
git checkout -b feature-branch
```4. **Make Your Changes**: Make your changes and commit them with clear and descriptive commit messages.
```sh
git commit -m "Description of your changes"
```5. **Push to Your Fork**: Push your changes to your forked repository.
```sh
git push origin feature-branch
```6. **Submit a Pull Request**: Open a pull request on the original repository with a description of your changes. Please ensure your PR includes any relevant tests and follows the projectβs coding conventions and guidelines.
### Issues and Bug Reports
If you encounter any issues or bugs, please [open an issue] on GitHub. Be sure to include detailed information about the problem and how to reproduce it.
## License
This project is licensed under the GNU General Public License Version 3 (GPLv3). See the [LICENSE](LICENSE) file for the full text.
[documentation]: https://phaistos.readthedocs.io/en/latest/
[Phaistos Disc]: https://en.wikipedia.org/wiki/Phaistos_Disc
[examples README]: ./examples/README.md
[`examples` folder]: ./examples
[open an issue]: https://github.com/your-repository/issues