Interact with the RackN Digital Rebar API
Project description
Interact with the RackN Digital Rebar API (in a way that’s useful to us).
Free software: Apache Software License 2.0
Installation
pip install pyprotonrebar
You can also install the in-development version with:
pip install git+ssh://git@github.com/ProtonMail/pyprotonrebar.git@main
Documentation
While primarily intended as common code for https://github.com/ProtonMail/proton.rackndr, it can also be used as is.
For example, to use the project to create a new Param:
import pyprotonrebar.pyrackndr
TOKEN = pyprotonrebar.pyrackndr.fetch_token_requests(
'superuser',
'user:pass',
'https://localhost:8092')
AUTH = TOKEN['header']
rebar_object = pyprotonrebar.pyrackndr.RackNDr(
'https://localhost:8092',
AUTH,
'params')
data = pyprotonrebar.CONSTANTS['params'].copy()
data['Description'] = 'new-param description goes here'
data['Documentation'] = 'new-param documentation goes here'
data['Name'] = 'new-param'
data['Secure'] = False
data['Schema'] = {
'type': 'string',
'default': 'hello'
}
rebar_object.create(data)
Development
To run all the tests run:
tox
Note, to combine the coverage data from all the tox environments run:
Windows |
set PYTEST_ADDOPTS=--cov-append tox |
|---|---|
Other |
PYTEST_ADDOPTS=--cov-append tox |
Changelog
0.0.0 (2024-02-01)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
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 pyprotonrebar-0.0.1.tar.gz.
File metadata
- Download URL: pyprotonrebar-0.0.1.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
443d8b3b428ba99a7972f0b0364bf0c2b2ca23abeb17facfb8a828a1e54fab24
|
|
| MD5 |
d422fe36fb0ee999a1ff2201f67c2e37
|
|
| BLAKE2b-256 |
674c96ce82953826cd9714f96fab16f365856e82e63ace2397edcffd9246e864
|
File details
Details for the file pyprotonrebar-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pyprotonrebar-0.0.1-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b889d700d7a18e50b3c4599289517ed7d9b6f6164ecaec31900f31c8bb8ba00
|
|
| MD5 |
4b07e9f594373b39e34bafd5020713df
|
|
| BLAKE2b-256 |
08fd8a57fc823719adc5d3e4e0d7206d6a8f498ef0cc6bd9e069a1238e01252b
|