astrapy
A Python client for the Data API on DataStax Astra DB
Decision gist · record as of 2026-08-14
Yes. AstraPy is actively maintained, production-stable, has low install friction, carries a permissive license, and provides a clean Python abstraction for Astra DB's Data API. Install it if you are already using Astra DB or evaluating it as a serverless vector database backend. No security vulnerabilities are known.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires an active Astra DB instance and valid API endpoint and token credentials from astra.datastax.com.
- Low install friction with a pure-wheel distribution.
- Active maintenance with recent releases (36 days since last update) and a stable codebase marked as Production/Stable.
License · maintenance · safety
permissive license (permissive) — Licensed under Apache Software License (permissive), allowing commercial use and modification with minimal restrictions.
last release 2026-07-09 (36 days) · last repo commit 2026-07-26 · 39 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 388,109 downloads/mo, #7,037 on PyPI
Alternatives
Verify before relying
pip install astrapy
from astrapy import DataAPIClient
client = DataAPIClient()
db = client.get_database(
"https://01234567-....apps.astra.datastax.com",
token="AstraCS:..."
)
collection = db.create_collection("my_collection")
collection.insert_one({"text": "example"})
results = collection.find({})- Whether server-side embedding providers (e.g., 'example_vendor') are included or require external setup.
- Performance characteristics for large-scale vector searches or bulk operations.
- Specific latency or throughput guarantees for the Data API backend.
What it is and what it does
AstraPy is a Python client for DataStax Astra DB's Data API, providing a pythonic interface to store, query, and search documents and structured table data. It abstracts the HTTP-based Data API into familiar Python objects and methods, supporting both schemaless document collections and typed table structures with vector indexing.
The library handles vector search natively, including hybrid search combining lexical and vector-based ranking, and supports server-side embedding generation when the backend is configured with a vectorize provider. It wraps httpx for HTTP communication and includes utilities for UUID generation and type hints, making it suitable for applications that need to integrate Astra DB as a backend without managing raw API calls.
Use it for
- Build semantic search features by storing document embeddings and querying with vector similarity.
- Create RAG (retrieval-augmented generation) pipelines using hybrid search to combine text and vector matching.
- Store and retrieve structured data in typed tables with vector indexes for similarity-based lookups.
- Integrate Astra DB as a serverless vector store in Python applications without managing database infrastructure.
- Perform hybrid search combining keyword matching and semantic similarity in a single operation.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
AstraPy is actively maintained, production-stable, has low install friction, carries a permissive license, and provides a clean Python abstraction for Astra DB's Data API. Install it if you are already using Astra DB or evaluating it as a serverless vector database backend. No security vulnerabilities are known.
Install
astrapy on PyPI
Before you install
Low install friction with a pure-wheel distribution. Active maintenance with recent releases (36 days since last update) and a stable codebase marked as Production/Stable. Supports current Python versions 3.10 through 3.14.
Requires an active Astra DB instance and valid API endpoint and token credentials from astra.datastax.com.
License in practice
Licensed under Apache Software License (permissive), allowing commercial use and modification with minimal restrictions.
Quickstart
pip install astrapy
from astrapy import DataAPIClient
client = DataAPIClient()
db = client.get_database(
"https://01234567-....apps.astra.datastax.com",
token="AstraCS:..."
)
collection = db.create_collection("my_collection")
collection.insert_one({"text": "example"})
results = collection.find({})
Verify before relying
- Whether server-side embedding providers (e.g., 'example_vendor') are included or require external setup.
- Performance characteristics for large-scale vector searches or bulk operations.
- Specific latency or throughput guarantees for the Data API backend.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release <4.0,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 8 packagesdeprecationh11httpxipythonpymongotomltyping-extensionsuuid6 |
| Maintenance | Actively maintained 36 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 388,109 / month, #7,037 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Build Tools |
Evidence: astrapy-2.3.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “astra db python client”
- astrapyAstraPy is a Python client library for DataStax Astra DB that enables…
- langchain-astradbIntegrates Astra DB (a serverless vector database built on Apache…
- cassandra-driverA Python client library for Apache Cassandra and DataStax Enterprise…
Give your agent the search over MCP, or paste the wish link into any chat.
More Build Tools packages
Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.
Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.
Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.
pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.
Install it if your team needs consistent, automated validation at commit time.
See also langchain-astradb · upstash-vector · qdrant-client · cassandra-driver · astra-assistants · pymongo-search-utils · ragstack-ai-knowledge-store · redisvl · google-cloud-vectorsearch · firebolt-sdk