Install & Compatibility
Where this runs
tested against v1.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.396s · 23.6MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.2s · import 0.370s · 24MB
21MB installed
● package 21MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Atlas
✓ from atlasclient.client import Atlas
The main client class for connecting to Apache Atlas.
Initializes the `Atlas` client and performs a basic attribute-based search for 'DataSet' entities. Ensure `ATLAS_HOST`, `ATLAS_PORT`, `ATLAS_USERNAME`, and `ATLAS_PASSWORD` environment variables are set or replaced with actual values. The default port for HTTP is 21000, and for HTTPS is 21443.
import os
from atlasclient.client import Atlas
# Replace with your Atlas host, port, username, and password
ATLAS_HOST = os.environ.get('ATLAS_HOST', 'localhost')
ATLAS_PORT = int(os.environ.get('ATLAS_PORT', '21000')) # Default HTTP port
ATLAS_USERNAME = os.environ.get('ATLAS_USERNAME', 'admin')
ATLAS_PASSWORD = os.environ.get('ATLAS_PASSWORD', 'admin')
try:
client = Atlas(ATLAS_HOST, port=ATLAS_PORT, username=ATLAS_USERNAME, password=ATLAS_PASSWORD)
print(f"Successfully connected to Atlas at {ATLAS_HOST}:{ATLAS_PORT}")
# Example: Search for entities (e.g., of type 'DataSet')
params = {'typeName': 'DataSet', 'attrName': 'name', 'attrValue': 'data', 'offset': '0', 'limit': '10'}
search_results = client.search_attribute(**params)
if search_results:
print(f"Found {len(search_results[0].entities)} 'DataSet' entities matching criteria:")
for s in search_results:
for e in s.entities:
print(f" Name: {e.name}, GUID: {e.guid}")
else:
print("No 'DataSet' entities found matching criteria.")
except Exception as e:
print(f"Error connecting to Atlas or performing search: {e}")
Debug
Known issues
gotchaThis `atlasclient` library by `jpoullet2000` is only compatible with Apache Atlas REST API v2. It does not support newer API versions.fixEnsure your Apache Atlas server is running API v2. For newer Atlas versions, consider using the official `apache-atlas` client.
affects: All versions
deprecatedThe `jpoullet2000/atlasclient` library has not seen active development or new releases since 2019 (version 1.0.0). For new projects or ongoing maintenance, it is highly recommended to use the official and more actively maintained `apache-atlas` library (`pip install apache-atlas`).fixFor new projects, prefer `pip install apache-atlas`. For existing projects, be aware that this library may not receive updates or bug fixes.
affects: 1.0.0 and earlier
gotchaThe PyPI listing for `atlasclient` by `jpoullet2000` shows its Development Status as '2 - Pre-Alpha' despite being version '1.0.0'. This conflicting information might suggest it's not considered production-ready by its maintainers or that the status was not updated correctly.fixProceed with caution, especially in production environments. Test thoroughly and consider the official `apache-atlas` client for robust solutions.
affects: All versions
gotchaConnection details (host, port, username, password) are crucial for client initialization. Default port 21000 is for HTTP, 21443 for HTTPS. Incorrect credentials or host can lead to connection failures.fixDouble-check your Apache Atlas server's host, port, and authentication credentials. Use `os.environ.get()` for sensitive information or configuration management tools.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'atlasclient'
The 'atlasclient' package is not installed in the Python environment.
fixInstall the package using pip: 'pip install atlasclient'.
ImportError: cannot import name 'Atlas' from 'atlasclient.client'
The 'Atlas' class is not found in 'atlasclient.client' due to incorrect import statement or version mismatch.
fixEnsure the correct import statement: 'from atlasclient.client import Atlas'.
AttributeError: 'Atlas' object has no attribute 'entity_guid'
The 'entity_guid' method does not exist in the 'Atlas' class, possibly due to API changes or incorrect usage.
fixRefer to the official documentation to find the correct method for retrieving entity status.
TypeError: 'NoneType' object is not iterable
A method returned 'None' instead of an iterable, possibly due to a failed API call or incorrect parameters.
fixCheck the API response and ensure all parameters are correct; handle 'None' responses appropriately.
HTTPError: 503 Server Error: Service Unavailable for url: http://<atlas.host>:21000/api/atlas/v2/entity/guid/<guid>
The Apache Atlas server is unavailable or experiencing issues, leading to a 503 Service Unavailable error.
fixVerify the Atlas server is running and accessible; check server logs for issues.
Upgrade
Version history
1.0.0latest on PyPI · released Aug 19, 2019
Audit
Dependencies
requestsrequiredUsed for making HTTP requests to the Apache Atlas API.