Posts for: #Python

Python Packaging with uv

uv is a fast Python package manager and project tool written in Rust.

Why uv over pip/poetry/pipenv?

  • 10–100x faster dependency resolution.
  • Single tool: replaces pip, pip-tools, virtualenv, and pyenv.
  • Lockfile support via uv.lock.

Common commands

uv init myproject          # scaffold a new project
uv add requests            # add a dependency
uv sync                    # install from lockfile
uv run pytest              # run inside the managed venv

Project convention

All Python projects in this workspace use uv exclusively — no raw pip install or python -m pytest.

[Read more]

Vector Search with ChromaDB

ChromaDB is an embedding database for building search and retrieval systems.

How I use it

I chunk documentation (VyOS, Hugo) into paragraphs, embed them with nomic-embed-text via Ollama, and store the vectors in ChromaDB for semantic search.

Stack

Documents → Chunker → Ollama embeddings → ChromaDB → Query API

Key concepts

  • Collection: a named group of embeddings (like a table).
  • Document: the raw text stored alongside the vector.
  • Metadata: key-value pairs for filtering results.
[Read more]