Skip to main content

Write the smallest possible OpenAPI and generate the rest

Project description

atomically

PyPI Tests Changelog License

[!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.

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

atomically-0.2.0.tar.gz (10.2 kB view hashes)

Uploaded Source

Built Distribution

atomically-0.2.0-py3-none-any.whl (10.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page