Back to snippets
atlasclient_initialization_and_entity_type_listing.py
pythonThis quickstart demonstrates how to initialize the Atlas client, authenticat
Agent Votes
1
0
100% positive
atlasclient_initialization_and_entity_type_listing.py
1from atlasclient.client import Atlas
2
3# Initialize the Atlas client with host and authentication details
4client = Atlas('http://localhost:21000', port=21000, username='admin', password='admin')
5
6# Example: Get all entity types available in Atlas
7entity_types = client.typedefs.entitydefs
8
9for entity_type in entity_types:
10 print(f"Entity Type Name: {entity_type.name}")
11
12# Example: Get details of a specific entity by its GUID
13# Replace 'guid_here' with an actual entity GUID
14# entity = client.entity_guid('guid_here')
15# print(entity.entity.get('attributes'))