A client for the Nectar Allocation API.
Usage
First create a client instance using the keystoneauth session API:
>>> from keystoneauth1 import loading
>>> from keystoneauth1 import session
>>> from nectarallocationclient import client
>>> loader = loading.get_plugin_loader('password')
>>> auth = loader.load_from_options(auth_url=AUTH_URL,
... username=USERNAME,
... password=PASSWORD,
... project_name=PROJECT_NAME,
... user_domain_id='default',
... project_domain_id='default'
)
>>> sess = session.Session(auth=auth)
>>> nectar = client.Client(VERSION, session=sess)
Here VERSION can currently only be 1.
If you have PROJECT_ID instead of a PROJECT_NAME, use the project_id parameter. Similarly, if your cloud uses keystone v3 and you have a DOMAIN_NAME or DOMAIN_ID, provide it as user_domain_(name|id) and if you are using a PROJECT_NAME also provide the domain information as project_domain_(name|id).
nectarallocationclient adds ‘python-nectarallocationclient’ and its version to the user-agent string that keystoneauth produces. If you are creating an application using nectarallocationclient and want to register a name and version in the user-agent string, pass those to the Session:
>>> sess = session.Session( ... auth=auth, app_name'nodepool', app_version'1.2.3')
If you are making a library that consumes nectarallocationclient but is not an end-user application, you can append a (name, version) tuple to the session’s additional_user_agent property:
>>> sess = session.Session(auth=auth)
>>> sess.additional_user_agent.append(('shade', '1.2.3'))
For more information on this keystoneauth API, see Using Sessions.
Then call methods on its managers:
>>> nectar.allocations.list()
[<Allocation: 1 (my-cool-project)>]
>>> nectar.allocations.create("new-project",....)
<Allocation: 2 (new-project)>
Metadata
Release files for nectarallocationclient 2.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nectarallocationclient-2.1.1.tar.gz | 42.8 kB | Without provenance | Details for nectarallocationclient-2.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nectarallocationclient-2.1.1-py3-none-any.whl | Python 3 | none | any | Details for nectarallocationclient-2.1.1-py3-none-any.whl |
Total release size: 122.8 kB
Release files / nectarallocationclient-2.1.1.tar.gz
| Download URL | nectarallocationclient-2.1.1.tar.gz |
|---|---|
| Size | 42.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7da34b02c34c089f991639d4b5a729adfa6252e5381b7f2b3dfd9529de3773e
|
|
BLAKE2b-256 checksum How to use checksums |
eb240c467c329b042a853da6b919b1d607d5f89ed2c47d879bcf07374d6f1663
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / nectarallocationclient-2.1.1-py3-none-any.whl
| Download URL | nectarallocationclient-2.1.1-py3-none-any.whl |
|---|---|
| Size | 80.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
efcef7484ee3c74a612bdd1bb5c5e6d111ddd9fe43cabb01f310574ae3161422
|
|
BLAKE2b-256 checksum How to use checksums |
e3a1f4088a5ae39e868b931f1ba0576886ea363af09d59a9bbbe6b0bab29bc83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for nectarallocationclient 2.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.