EHESO API
Project description
EHESO API Client for Python
This Python package is automatically generated by the OpenAPI Generator project:
- API version: v1
- Package version: 0.1.10
- Generator version: 7.7.0
- Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen
Requirements.
Python 3.7+
Installation & Usage
pip install
pip install eheso-api-client
Post-Installation Setup
After installing the package, you need to create a .env file in the source folder containing the API key for server access.
Steps to Create the .env
File:
- Navigate to the folder where the package is installed or the source folder of your project.
- Create a file named
.env
. - Add the following line to the
.env
file:
API_KEY="your_api_key_here"
Replace your_api_key_here
with the actual API key provided to you.
For example:
API_KEY=abcd1234efgh5678ijkl
Save the .env
file.
Note
- The package uses the
.env
file to securely load the API key into the application. - Please make sure the .env file is not included in version control systems like Git (add .env to your .gitignore).
Getting Started
After installing the package and creating the .env
file, run the following code:
import time
import eheso_api_client
from eheso_api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://observatory.local:3001/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = eheso_api_client.Configuration(
host = "http://observatory.local:3001/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with eheso_api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = eheso_api_client.LayerDataApi(api_client)
layer_id = 'HEI' # str | The ID of the layer
layer_id_export_request = eheso_api_client.LayerIdExportRequest() # LayerIdExportRequest |
try:
# Export Layer Data to File
api_instance.layer_id_export(layer_id, layer_id_export_request)
except ApiException as e:
print("Exception when calling LayerDataApi->layer_id_export: %s\n" % e)
License
This project is licensed under the MIT License.
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
eheso_api_client-0.1.10.tar.gz
(30.7 kB
view details)
Built Distribution
File details
Details for the file eheso_api_client-0.1.10.tar.gz
.
File metadata
- Download URL: eheso_api_client-0.1.10.tar.gz
- Upload date:
- Size: 30.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc86aaba0c0d5888e0d49a470ef5c5e2607a9e3c046da0f9c2a0ff819b3683fc |
|
MD5 | 163ae5bf9979f11567abea4321ae00a9 |
|
BLAKE2b-256 | 62cd7a58fe1cc89b5f276b8a10a5b4feae8c3c8c4349fa11f6c3e06338dd3103 |
File details
Details for the file eheso_api_client-0.1.10-py3-none-any.whl
.
File metadata
- Download URL: eheso_api_client-0.1.10-py3-none-any.whl
- Upload date:
- Size: 46.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 979259cb6654568a846173bf211141384e76942abf609ff4d4757d27273a8147 |
|
MD5 | 4ae9a6aefe6b80fcb673d2019c7b5315 |
|
BLAKE2b-256 | 1a6056aeeef04fc3c4ac6282febb711c6b934fb0b2f843d902bde39ddd1a700f |