Skip to main content

Python Aurora Solar Client

A python client for the Aurora Solar API.

Dependencies

  • requests

Getting Started

pip install AuroraSolarClient

Usage

v2.0.1

AuroraSolarClient supports both API versions 2018.01 and v2022.09 as well as HMAC and Bearer token authentication. Instantiation of the client requires tenant_id and credentials. The third version parameter is optional and if not provided, then API v2022.09 is assumed.

client = AuroraSolarClient(tenant_id, credentials, version)

tenant_id (string) : The tenant Id assigned to you by Aurora Solar.

credentials (object) : JSON object containting either api_token (for bearer authentication), or api_key and api_secret (for HMAC authentication). If api_token exists, the client will automatically use the preferred bearer authentication.

version (string) (optional) : The version of AuroraSolar API you wish to use. If not provided, the default is "2022.09". The only other acceptable version is "2018.01".

Example using bearer token (most common)

from AuroraSolarClient import AuroraSolarClient

tenant_id = "my_tenant_id"
credentials = { "api_token": "sk_prod_1234abc4321cba" }

client = AuroraSolarClient(tenant_id, credentials)
print("Aurora Solar Client", client.version, client.auth_type)
response = client.get_versions()
print("response:", response.text)

Example using API v2018.01 with HMAC authentication

from AuroraSolarClient import AuroraSolarClient

tenant_id = "my_tenant_id"
credentials = { 
	api_key: "my_api_key", 
	api_secret: "my_api_secret"
}

client = AuroraSolarClient(tenant_id, credentials, "2018.01")
print("Aurora Solar Client", client.version, client.auth_type)
response = client.get_versions()
print("response:", response.text)

v1.0.4

AuroraSolarClient only supports API v2018.01, uses HMAC authentication only, and must be initialized with a tenant_id, api_key, and api_secret. Once intialized, you can use any of the provided functions to return a requests response object.

client = AuroraSolarClient(tenant_id, api_key, api_secret)

tenant_id (string) : The tenant Id assigned to you by Aurora Solar.

api_key (string) : The API key assigned to you by Aurora Solar.

api_secret (string) : The API secret assigned to you by Aurora Solar.

Example

from AuroraSolarClient import AuroraSolarClient

client = AuroraSolarClient("my_tenant_id", "my_api_key", "my_api_secret")
response = client.get_project("aurora_project_id")
print("response:", response.text)

Change Log

Note: v2.0.1 is initialized with different parameters from v1.0.4. Upgrading from v1.0.4 to v2.0.1 is a breaking change.

v2.0.1

  • Added support for API version 2022.09 while retaining support for 2018.01
  • Added support for bearer authentication while retaining support for HMAC authentication
  • Added more supported endpoints

v1.0.4

  • original build out for API version 2018.01
  • pre-official documentation
  • only HMAC authentication supported
  • limited endpoints

Metadata

Release files for AuroraSolarClient 2.0.1

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

Source distribution (sdist)

Source distribution for AuroraSolarClient 2.0.1
File Size Uploaded Provenance
AuroraSolarClient-2.0.1.tar.gz 3.5 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 8.3 kB

Release files / AuroraSolarClient-2.0.1.tar.gz

Download URL AuroraSolarClient-2.0.1.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7a3b0f5a61026ed7fd1247719da89a4b7ca1855f6ed6fc06ed4aa798fbab02d0
BLAKE2b-256 checksum
How to use checksums
3b661356587b75aa91a8b7478b5a9bc3bc1f410e0b560bf38720ff3fe69c2550
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

Release files / AuroraSolarClient-2.0.1-py3-none-any.whl

Download URL AuroraSolarClient-2.0.1-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bcfcf827e52204663bfacad6ec3a68ae69d68173c549d905cc90c94768e9298a
BLAKE2b-256 checksum
How to use checksums
bd48d633aca349c4d315af94d4d60be646df1caf9f85eaabc880571c565b494e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

Security for AuroraSolarClient 2.0.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.

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