Write the smallest possible OpenAPI and generate the rest
Project description
atomically
[!NOTE] This library is for experimenting and prototyping at this point and may change considerably until it reaches version 1.0.0. Please be cautious about relying on this library at this point.
Write the smallest possible OpenAPI and generate the rest. Read more about this approach in the Atomically repository.
Installation
You can use pipx to install this tool.
You can use pipx
to install this tool.
- Install pipx
- Run
pipx install atomically
You can also use pip
:
pip install atomically
Usage
As CLI
Run atomically --help
to see all options.
To generate an OpenAPI from from an atomic file, run:
atomically generate path-to-atomic-file.yml
Read the Atomically repository to see how to write atomic files. Check the tests/atomic_files
directory in this repo to see examples.
As Python library
from atomically import Atomically
openapi = Atomically.from_file("atomically.yaml").generate()
with open("openapi.yaml", "w") as f:
f.write(openapi.to_yaml())
Development
To contribute to this library, first checkout the code. Then create a new virtual environment:
cd atomically
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
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
File details
Details for the file atomically-0.2.0.tar.gz
.
File metadata
- Download URL: atomically-0.2.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b571a2bbcdd70eaaf00ee79d3215925791515e3ca19197b1f2899c16d1b7ae56 |
|
MD5 | d39883fa7aa418420bbded63dc748f0c |
|
BLAKE2b-256 | e18fa7b9d45826a7a8a4210fdbdd45210618b7afb96c0e553331d8569bdcd2b6 |
File details
Details for the file atomically-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: atomically-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e356f6c4efb984a316968449c17fef7124f98fbc151b315b39679eaaad55a9f5 |
|
MD5 | 39cef49cf7d182cf36de759a2355d4e1 |
|
BLAKE2b-256 | 85efc4d1c0f62e91630eca53bb7c5a94c97819d3cdc779bb5936fb7e158fe5f5 |