📊 Project Stats
- 🐍 Python Versions: 3.9, 3.10, 3.11, 3.12, 3.13
- 📦 Package Size: Optimized for fast installation
- 🚀 Performance: Built with modern async/await support
- 🔧 Dependencies: Minimal, modern stack
- 📈 Stability: Production-ready
📦 Installation
Production Use
# Latest stable version
pip install pyatlan
# Specific version
pip install pyatlan==7.1.3
# With uv (faster) - install uv first: curl -LsSf https://astral.sh/uv/install.sh | sh
uv add pyatlan
Development Setup
# Clone the repository
git clone https://github.com/atlanhq/atlan-python.git
cd atlan-python
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install with development dependencies
uv sync --group dev
# Run quality checks
uv run ./qa-checks
# Run tests
uv run pytest tests/unit
Dependency Groups
This project uses uv dependency groups for better dependency management:
- Core dependencies: Always installed (
uv sync) - Development dependencies: Testing, linting, formatting (
uv sync --group dev) - Documentation dependencies: Sphinx docs (
uv sync --group docs)
You can install multiple groups:
# Install both dev and docs dependencies
uv sync --group dev --group docs
# Install all dependencies
uv sync --all-groups
🐳 Docker
Pre-built Images (Harbor)
# Latest main image
docker pull registry.atlan.com/public/pyatlan:main-latest
# Version + Python tag
docker pull registry.atlan.com/public/pyatlan:8.5.1-3.11
# Commit-specific image
docker pull registry.atlan.com/public/pyatlan:sha-1a064032
Usage
# Interactive Python session
docker run -it --rm registry.atlan.com/public/pyatlan:main-latest
# Run a script
docker run -it --rm \
-v $(pwd):/app \
-e ATLAN_API_KEY=your_key \
-e ATLAN_BASE_URL=https://your-tenant.atlan.com \
registry.atlan.com/public/pyatlan:main-latest \
python your_script.py
🔒 Security Scans
Run Snyk locally (dependencies)
uv export --all-extras --no-hashes > requirements.txt
snyk test --file=requirements.txt --severity-threshold=high --skip-unresolved
rm -f requirements.txt
🧪 Testing
Unit Tests
# Run all unit tests
uv run pytest tests/unit
# Run with coverage
uv run pytest tests/unit --cov=pyatlan --cov-report=html
Integration Tests
# Set up environment
cp .env.example .env
# Edit .env with your Atlan credentials
# Run integration tests
uv run pytest tests/integration
Quality Assurance
# Run all QA checks (formatting, linting, type checking)
uv run ./qa-checks
# Individual checks
uv run ruff format . # Code formatting
uv run ruff check . # Linting
uv run mypy . # Type checking
🤝 Contributing
We welcome contributions! Here's how to get started:
Development Setup
# Fork and clone the repository
git clone https://github.com/your-username/atlan-python.git
cd atlan-python
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install development dependencies
uv sync --group dev
# Install pre-commit hooks
uv run pre-commit install
Making Changes
# Create a feature branch
git checkout -b feature/amazing-feature
# Make your changes and test
uv run ./formatter
uv run ./qa-checks
uv run pytest tests/unit
# Commit with conventional commits
git commit -m "feat: add amazing feature"
# Push and create a pull request
git push origin feature/amazing-feature
Guidelines
- ✅ Follow conventional commits
- ✅ Add tests for new features
- ✅ Update documentation as needed
- ✅ Ensure all QA checks pass
🛠️ SDK Generator
Generate asset models from your Atlan instance:
# Generate models automatically
uv run ./generator
# Force re-download typedefs (bypass cache)
uv run ./generator --override
# Use custom typedefs file
uv run ./generator ./my-typedefs.json
# Both flags can be combined
uv run ./generator --override ./my-typedefs.json
This will:
- 📥 Retrieve typedefs from your Atlan instance
- 🏗️ Generate asset models, enums, and structures
- 🎨 Format code automatically
- ⚡ Support incremental updates
App Builders Generator
Generate the app builders in pyatlan.model.apps (one per connector
app) from your tenant's UI configmaps. Each app gets a typed *Inputs model and a
fluent, UI-equivalent builder (Credential → Connection → Metadata), plus a matching
unit-test module under tests/unit/apps/.
# Needs a tenant with the apps installed
export ATLAN_BASE_URL=https://<your-tenant-host>
export ATLAN_API_KEY=<your-api-key>
# Regenerate all app builders + their tests
uv run generate-apps
This will:
- 🔎 Discover installed apps (live discovery ∪ the manifest in
generate_apps.py) - 🧩 Read each app's UI configmaps for fields, labels, enums, and the credential form
- 🏗️ Emit a
{App}Inputsmodel +{App}builder per app (hand-written builders are never overwritten) - 🧪 Generate a per-app config-assertion test module
- 🎨 Format code automatically
To cover an app that isn't currently running on the tenant, add its
(app_id, entrypoint)toMANIFESTinpyatlan/generator/generate_apps.py.
🏗️ pyatlan_v9 Model Generation (msgspec)
The pyatlan_v9 package uses msgspec Struct-based models generated from Pkl type definitions in the atlanhq/models repo.
Using Claude Code
The recommended way to regenerate models is via the Claude Code skill:
# From the atlan-python repo root:
/generate-v9-models # Generate from models@master
/generate-v9-models <branch> # Generate from a specific models branch
/generate-v9-models test # Generate and run tests
/generate-v9-models <branch> test
The skill will:
- Clone/update
atlanhq/modelsat../models - Run the Pkl code generator with SDK mode (
pkl eval typedefs/*.pkl -m . -p sdk=true) - Selectively sync generated files to
pyatlan_v9/model/assets/(excluding hand-written types) - Apply post-sync patches (e.g.,
set[str]fields inasset.py) - Optionally run
tests_v9/unit/tests
Overlay Files
Custom methods (creator(), updater(), policy helpers, etc.) live in pyatlan_v9/model/assets/_overlays/. These are Python files read by the Pkl renderer and injected into generated classes. Each overlay file uses import directives:
# IMPORT:— external imports (not remapped)# INTERNAL_IMPORT:— internal imports (remapped topyatlan_v9.*)# STDLIB_IMPORT:— standard library imports
Hand-written Types
Some types are not yet fully generated and are maintained by hand:
- Infrastructure:
__init__.py,entity.py,referenceable.py - GTC types:
atlas_glossary.py,atlas_glossary_term.py,atlas_glossary_category.py - Others:
persona.py,purpose.py,badge.py,access_control.py,auth_policy.py, etc.
📁 Project Structure
Understanding the codebase layout will help you navigate and contribute effectively:
atlan-python/
├── pyatlan/ # 🐍 Main Python package
│ ├── __init__.py # Package initialization
│ ├── cache/ # 💾 Caching mechanisms
│ │ ├── atlan_tag_cache.py # Tag name ↔ GUID mapping
│ │ ├── custom_metadata_cache.py # Custom metadata definitions
│ │ ├── enum_cache.py # Enum value caching
│ │ └── aio/ # Async versions of caches
│ ├── client/ # 🌐 HTTP client implementations
│ │ ├── atlan.py # Main synchronous client
│ │ ├── asset.py # Asset operations (CRUD, search)
│ │ ├── admin.py # Administrative operations
│ │ ├── audit.py # Audit log operations
│ │ ├── common/ # Shared client logic
│ │ └── aio/ # Async client implementations
│ ├── model/ # 📊 Data models and assets
│ │ ├── assets/ # Asset type definitions
│ │ │ ├── core/ # Core asset types (Table, Database, etc.)
│ │ │ └── relations/ # Relationship models
│ │ ├── fields/ # Search field definitions
│ │ ├── open_lineage/ # OpenLineage specification models
│ │ ├── packages/ # Package/workflow models
│ │ └── aio/ # Async model variants
│ ├── generator/ # 🏗️ Code generation tools
│ │ ├── templates/ # Jinja2 templates for generation
│ │ └── class_generator.py # Main generation logic
│ ├── pkg/ # 📦 Package creation utilities
│ ├── events/ # 🔔 Event handling (webhooks, lambdas)
│ ├── samples/ # 💡 Example code and scripts
│ └── test_utils/ # 🧪 Testing utilities
├── tests/ # 🧪 Test suite
│ ├── unit/ # Unit tests (fast, no external deps)
│ ├── integration/ # Integration tests (require Atlan instance)
│ └── data/ # Test fixtures and mock data
├── docs/ # 📚 Sphinx documentation
│ ├── conf.py # Sphinx configuration
│ └── *.rst # Documentation source files
├── pyproject.toml # 📋 Project configuration (deps, tools)
├── uv.lock # 🔒 Locked dependencies
├── qa-checks # ✅ Quality assurance script
├── formatter # 🎨 Code formatting script
└── generator # 🏗️ Model generation script
Key Components
🌐 Client Layer (pyatlan/client/)
- Synchronous: Direct HTTP operations using
httpx - Asynchronous: Async/await operations using
httpx.AsyncClient - Common: Shared business logic between sync/async clients
- Specialized: Domain-specific clients (admin, audit, lineage, etc.)
📊 Model Layer (pyatlan/model/)
- Assets: 400+ asset types (tables, dashboards, pipelines, etc.)
- Core Models: Base classes, requests, responses
- Fields: Search and filtering field definitions
- OpenLineage: Data lineage specification compliance
💾 Cache Layer (pyatlan/cache/)
- Tag Cache: Maps human-readable tag names to internal GUIDs
- Custom Metadata: Caches custom attribute definitions
- Connection Cache: Stores connector and connection metadata
- Async Variants: Full async implementations for all caches
🏗️ Generation System (pyatlan/generator/)
- Templates: Jinja2 templates for assets, enums, documentation
- Generator: Retrieves typedefs and generates Python models
- Incremental: Only regenerates changed models for efficiency
🧪 Testing Strategy
- Unit Tests: Fast, isolated tests with mocks/fixtures
- Integration Tests: Real API calls (requires credentials)
- VCR Cassettes: Record/replay HTTP interactions for consistent testing
📦 Package System (pyatlan/pkg/)
- Custom Packages: Framework for building Atlan-deployable packages
- Templates: Pre-built package structures and configurations
- Utilities: Helper functions for package development
Development Workflow
- Models: Generated from your Atlan instance's typedefs
- Clients: Hand-crafted for optimal developer experience
- Tests: Mix of unit (fast iteration) and integration (real validation)
- Quality: Automated formatting, linting, and type checking
- Documentation: Auto-generated from docstrings and examples
📄 License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
🙏 Attribution
Portions of this SDK are based on original work from:
- Apache Atlas (Apache-2.0 license)
- Elasticsearch DSL (Apache-2.0 license)
Built with 💙 by Atlan
Metadata
Release files for pyatlan 11.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyatlan-11.7.0.tar.gz | 4.3 MB | Without provenance | Details for pyatlan-11.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyatlan-11.7.0-py3-none-any.whl | Python 3 | none | any | Details for pyatlan-11.7.0-py3-none-any.whl |
Total release size: 10.6 MB
Release files / pyatlan-11.7.0.tar.gz
| Download URL | pyatlan-11.7.0.tar.gz |
|---|---|
| Size | 4.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd4e1a3695dd4cafe90ee3284fe2f40a10755241d67c6b2dce14eb0eb0b89cf6
|
|
BLAKE2b-256 checksum How to use checksums |
8e5324383f0569e6409f94b3aed539b7cab9a264b86bd1b514de11d78087140e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pyatlan-11.7.0-py3-none-any.whl
| Download URL | pyatlan-11.7.0-py3-none-any.whl |
|---|---|
| Size | 6.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf26c7918032f08b4f3eafed3aee95369ec2c2ebc84e2b90ec0167e89eeecd65
|
|
BLAKE2b-256 checksum How to use checksums |
3b4d496907e1f0eb3fec69a78442479425899ff684383fa925d408ab49c5ff6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for pyatlan 11.7.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.