Skip to main content

Idiomatic way for Python developers to integrate with Alfredo services.

deploy versions

1 Installation

On most systems, you can use pip (recommended):

# Make sure we have an up-to-date version of pip and setuptools:
pip install --upgrade pip setuptools

pip install alfredo-python

Both Python 2 and 3 are supported.

2 Command Line Interface Usage

The main command to interact with Alfredo stack is alfredo.

Input is expected to be in YAML format, and also the output is serialized in that way.

You can set RUOTE_ROOT and/or VIRGO_ROOT env vars to point the CLI and the SDK to your desired installation of the Alfredo stack.

After that, you can execute alfredo to get the usage help.

You can also execute alfredo -help to get an updated list of the options you have, with examples.

3 Python Software Development Kit

The main module you need to import to interact with the Alfredo stack is alfredo.

The main functions of the module are the ruote and virgo ones, to get the client object to further interact with respective services.

You can use alfredo.ruote() to get annonymous access to the open endpoints in Ruote. The same applies for virgo.

For instance, you can use the annonymous access to get a token given an email and a password.

Please feel free of using the Python console to get used to the SDK prior to using it in real Python code.

>>> alfredo.ruote().sso.token_by_email.create(email='alice@example.com', password='*******')

400 - Bad Request

non_field_errors:
- Unable to log in with provided credentials.

>>> alfredo.ruote().sso.token_by_email.create(email='alice@example.com', password='********')

200 - OK

token: b1cff2aab075744ddda6b00805617f561e940107

You can use alfredo.ruote(token='b1cff2aab075744ddda6b00805617f561e940107') to get an authenticated client against Ruote.

>>> alfredo.ruote(token='b1bff2aab075744ddda6b00805617f561e940107')

200 - OK

AWSclusters: http://api.teamjamon.com/AWSclusters/
apps: http://api.teamjamon.com/apps/
clusters: http://api.teamjamon.com/clusters/
datasets: http://api.teamjamon.com/datasets/
files: http://api.teamjamon.com/files/
jobs: http://api.teamjamon.com/jobs/
queues: http://api.teamjamon.com/queues/
users: http://api.teamjamon.com/users/
vdcs: http://api.teamjamon.com/vdcs/

Most of the functions mimic the url structure of the http API, and receives named parameters as input.

Please refer to the Alfredo API documentation for further details.

4 Development

You can create your fork of the repo before making any change.

Never forget to install the requirements first if you are using an isolated virtualenv: pip install -r requirements.txt

And to include the test requirements if you are planning to pass the tests locally pip install -r requirements-test.txt

You can run the tests using nosetests --with-coverage --cover-package=alfredo --stop

Currently, the main branch is develop because the code is still in beta. You can make PRs against develop.

Metadata

Release files for alfredo-python 0.0.8

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

Source distribution (sdist)

Source distribution for alfredo-python 0.0.8
File Size Uploaded
alfredo-python-0.0.8.tar.gz 10.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for alfredo-python 0.0.8
File Interpreter ABI Platform
alfredo_python-0.0.8-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 32.7 kB

Release files / alfredo-python-0.0.8.tar.gz

Download URL alfredo-python-0.0.8.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
eff62cd27b110b06d7619a627c2523a53d3b42214540aec012fe74d3234904a0
BLAKE2b-256 checksum
How to use checksums
19233824ffd6083a6ae78764a24d551bc32c343f9ef6f22fcf65525b10e0da80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.9

Release files / alfredo_python-0.0.8-py2.py3-none-any.whl

Download URL alfredo_python-0.0.8-py2.py3-none-any.whl
Size 22.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f9bc2b89d8a69b68fecfae2a444c28c4325e9e50c9fcc30edf6bdb640f464b70
BLAKE2b-256 checksum
How to use checksums
26deb6405d3dc9115cce1969a9afee0f92920cc6ceb9abe889ad346286dcbd18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

1 release file

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