Skip to main content

Opsy

It's Opsy! A simple multi-user/role operations inventory system with aspirations.

Developing

It's recommended to use a virtual environment for development.

$ mkvirtualenv -p /usr/bin/python3.6 opsy

Clone down the opsy repo:

$ git clone git@github.com:testeddoughnut/opsy.git

Install opsy for development (ensure you are in your previously created virtualenv):

$ pip install --editable .

Create opsy.toml by copying the example config:

$ cp opsy.toml.example opsy.toml

Initialize the DB, the example config uses sqlite by default for development:

$ opsyctl db upgrade

You can now create your admin user and set its password, create a role, then add the user to the role:

$ opsyctl create-admin-user

Each route is protected by a permission for that route. You can get a full list of the permissions by running opsyctl permission-list. Permissions are granted to roles and users gain access to permissions by being in roles. The admin user and role created with the last command are automatically granted full permissions.

We are now ready to start opsy for the first time:

$ opsyctl run

By default it listens on http://127.0.0.1:5000/. You can access the auto generated swagger docs by navigating to http://127.0.0.1:5000/docs/.

Dealing with schema changes

If you are introducing a change that requires a schema change you must create a schema revision. This can be done like so:

$ opsyctl db migrate

This will autogenerate a new revision file under migrations/versions/. Please review the resulting file and make any changes necessary to account for changes that Alembic doesn't do a good job of detecting (things like table renames). Please review the following documentation for more information: https://alembic.sqlalchemy.org/en/latest/autogenerate.html#what-does-autogenerate-detect-and-what-does-it-not-detect

If you are upgrading Opsy and need to migrate to a newer version of the schema you can run the following:

$ opsyctl db upgrade

Metadata

Release files for Opsy 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Opsy 0.3.0
File Size Uploaded
Opsy-0.3.0.tar.gz 57.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Opsy 0.3.0
File Interpreter ABI Platform
Opsy-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 94.7 kB

Release files / Opsy-0.3.0.tar.gz

Download URL Opsy-0.3.0.tar.gz
Size 57.7 kB
Tags Source
SHA-256 checksum
How to use checksums
218cef004ee952d2f1123f521fad74614067acc874ef8144979ae3c3773b44b9
BLAKE2b-256 checksum
How to use checksums
9ad3322c76aa0b675df5c7db33abe0e3739e37de61f40c806f49141b80d0d9d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.10

Release files / Opsy-0.3.0-py3-none-any.whl

Download URL Opsy-0.3.0-py3-none-any.whl
Size 37.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d0872bde8fe94195111910617ef24a6242866d7a1a3dfc349d6cccee975984b
BLAKE2b-256 checksum
How to use checksums
141703b550c407f0e82a81f8ca8311811af1a7c9bc601c01d3a3d2af068c0082
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.10
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page