Qdrant for your AI app in Python
A managed Qdrant for embeddings, semantic search and RAG in your Python app, created by your coding agent or the terminal.
Ask your agent
Create a Qdrant server on Rowsafe Cloud for this app's embeddings and connect it with QDRANT_URL and QDRANT_API_KEY in .env.Your agent picks a size, tells you the price and waits for your yes, then creates the server as you. Once it's ready (5 to 10 minutes), click Make an API key for your app on its page in the dashboard: you see the connection details once, for your .env.
First time? Connect Rowsafe to your agent once.
Or from the terminal
rowsafe cloud create vectors --engine qdrant --wait
rowsafe db user add setup --access owner --expires 1 --on vectorsrowsafe cloud create shows the price and asks first. Your app's keys reach only the collections you pick, so create the collection first with a one-day admin key, then make the app's key: rowsafe db user add web --db documents --on vectors. Each key is shown once.
Connect your app
# pip install qdrant-client python-dotenv ; run once with the admin key
import os
from dotenv import load_dotenv
from qdrant_client import QdrantClient, models
load_dotenv()
client = QdrantClient(url=os.environ["QDRANT_URL"], api_key=os.environ["QDRANT_ADMIN_KEY"])
client.create_collection(
"documents",
vectors_config=models.VectorParams(size=1536, distance=models.Distance.COSINE), # your model's size
)import os
from qdrant_client import QdrantClient
client = QdrantClient(url=os.environ["QDRANT_URL"], api_key=os.environ["QDRANT_API_KEY"])
def nearest(embedding: list[float]):
return client.query_points("documents", query=embedding, limit=5).pointsQDRANT_URL is https:// plus your server's name and :6333 (on its page and in rowsafe cloud show vectors). HTTPS checks the server's certificate. Store points with client.upsert.
Backups and restores
Rowsafe snapshots your Qdrant every 15 minutes and at every Mark, encrypted on the server with a key only you have. A restore goes back to one of them. Every week it restores a backup to prove it works. Open a copy of a snapshot or rewind the whole database, in one click, with Undo for 7 days. Before a risky change, save a Mark (rowsafe mark), or let your agent save one.
From $0.014 an hour, never more than $10 a month.
Questions
Can I restore to any second?
No. Qdrant keeps no log of its changes, so backups are snapshots every 15 minutes, of the collections that changed, and at every Mark. A restore goes back to one of them.
Qdrant or pgvector?
Already on PostgreSQL? pgvector keeps embeddings next to your rows. Qdrant suits many millions of vectors and filtered search.
How does my app's server connect?
At first only your computer can. Add your server's address under Who can connect on the server's page, or run rowsafe cloud allow vectors ADDRESS.
More guides
- Add PostgreSQL to your Next.js appNext.js, node-postgres
- Managed MySQL for your Laravel appLaravel, MySQL 8.4
- Managed PostgreSQL for your Django appDjango, psycopg
- Managed PostgreSQL for your Rails appRuby on Rails, pg
- PostgreSQL for your Express app, with PrismaNode.js, Express, Prisma
- PostgreSQL for your FastAPI app, with SQLAlchemyFastAPI, SQLAlchemy, psycopg
- PostgreSQL with pgvector for your AI apppgvector, any framework
- A Valkey (Redis) cache for your Next.js appNext.js, node-redis
- Meilisearch for your Laravel app, with ScoutLaravel Scout, Meilisearch
- Managed MariaDB for your WordPress siteWordPress, MariaDB 11.8
- Managed PostgreSQL for your Spring Boot appSpring Boot, JDBC, HikariCP
- Managed PostgreSQL for your Go appGo, pgx
- PostgreSQL for your app, with DrizzleDrizzle ORM, node-postgres
- Valkey (Redis) for your Laravel appLaravel, phpredis or Predis
- Valkey (Redis) for Sidekiq and your Rails appRails, Sidekiq