--- id: astrapy version: "2.3.1" license: unclear license_treatment: permissive maintenance: active --- # astrapy — A Python client for the Data API on DataStax Astra DB License: permissive · Maintenance: active · Downloads: 388.1K/mo ## 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 above — verify before relying. AstraPy is a Python client library for DataStax Astra DB that enables document and table storage, retrieval, and vector search operations through a pythonic API. 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 pip install astrapy uv add astrapy poetry add astrapy ## Installing astrapy 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. 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({}) Requires an active Astra DB instance and valid API endpoint and token credentials from astra.datastax.com. 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: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 388.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags astra db python client, vector database client, datastax astra sdk, document database python, vector search python, astra db api wrapper, serverless database client, vector-search, serverless-database, datastax [View on SkillFed](https://skillfed.io/packages/astrapy) · [View on PyPI](https://pypi.org/project/astrapy/)