enpi_api.l2.client
The .enpi_api_client.EnpiApiClient class is the main entry point for interacting with the ENPICOM API. You use
it as a context manager, and by default it wil fetch the API key from the ENPI_API_KEY environment variable.
Different functionalities are separated by their contexts, a list of these can be found in the enpi_api.l2.client.api
module. These are all available as attributes of the .enpi_api_client.EnpiApiClient instance.
For example, to access the collection API to list all your collections with their metadata, you can do the following:
with EnpiApiClient() as enpi_client:
for collection in enpi_client.collection_api.get_collections_metadata():
print(collection)
1""" 2The `.enpi_api_client.EnpiApiClient` class is the main entry point for interacting with the ENPICOM API. You use 3it as a context manager, and by default it wil fetch the API key from the `ENPI_API_KEY` environment variable. 4 5Different functionalities are separated by their contexts, a list of these can be found in the `.api` 6module. These are all available as attributes of the `.enpi_api_client.EnpiApiClient` instance. 7 8For example, to access the `collection` API to list all your collections with their metadata, you can do the following: 9 10```python 11with EnpiApiClient() as enpi_client: 12 for collection in enpi_client.collection_api.get_collections_metadata(): 13 print(collection) 14``` 15"""