Pillar-python-sdk
Go to file
2021-03-19 12:03:43 +01:00
pillarsdk Use remove_private_keys() instead of popping predefined keys 2019-05-31 17:02:48 +02:00
tests Moving to Poetry 2019-04-26 15:50:41 +02:00
.gitignore Removed and gitignored poetry.lock 2019-05-23 16:23:45 +02:00
.travis.yml Also test on Python 3.6 2017-03-03 12:23:45 +01:00
CHANGELOG.md Updated changelog 2019-05-31 14:20:40 +02:00
LICENSE.md Renaming to Pillar SDK. 2015-08-31 19:25:01 +02:00
pyproject.toml Pin poetry deps to work around cryptography requiring Rust issue 2021-03-19 12:03:43 +01:00
README.md Document usage of Poetry 2019-05-10 15:00:05 +02:00
setup.cfg Build universal wheel, as our code should run on Python 2 and 3 2016-03-08 16:01:33 +01:00
tox.ini Fix compatibility with Tox 2019-05-10 14:07:20 +02:00
update_version.sh Updated update_version.sh to use Poetry 2019-05-10 15:17:12 +02:00

Pillar Python REST SDK

Integrate this module in your Python app to communicate with a Pillar server.

Supports Python 3.5-3.7.

Development & Testing

Dependencies are managed via Poetry.

When starting development, run poetry install to create a virtual environment and install dependencies.

To run the unit tests on all supported versions of Python, run poetry run tox.

Caching

Requests-Cache can be used to cache HTTP requests. The Pillar Python REST SDK does not support it directly, but provides the means to plug in different session objects:

import requests_cache
import pillarsdk

req_sess = requests_cache.CachedSession(backend='sqlite',
                                        cache_name='blender_cloud')
pillarsdk.Api.requests_session = req_sess

Any pillarsdk.Api instance will now use the cached session. To temporary disable it, use:

api = pillarsdk.Api.Default(endpoint="https://your.endpoint")
with api.requests_session.cache_disabled():
    node = pillarsdk.Node.find('1234')