ds-provider-postgresql-py-lib

A Python package from the DS library collection


Keywords
ds, python
License
Apache-2.0
Install
pip install ds-provider-postgresql-py-lib==0.1.0

Documentation

ds-provider-postgresql-py-lib

Python Versions PyPI version Build Status codecov License: Apache-2.0

DS package for ds-provider-postgresql-py-lib

Quick Start

Quick Setup

# 3. Install dependencies
uv sync --all-extras --dev

# 4. Install pre-commit hooks
uv run pre-commit install

# 5. Verify setup
make test

Development

Available Commands

Use the Makefile for all development tasks:

# Show all available commands
make help

# Code Quality
make lint           # Check code quality with ruff
make format         # Format code with ruff
make type-check     # Run mypy type checking
make security-check # Run security checks with bandit

# Testing
make test          # Run tests
make test-cov      # Run tests with coverage (requires 95%)

# Build and Publish
make build         # Build package
make docs          # Build documentation
make publish-test  # Upload to TestPyPI
make publish       # Upload to PyPI

Version Management

# Show current version
make version

# Tag and release
make tag           # Create git tag and push (triggers release)

⚠️ Warning: The make tag command will create a git tag and push it to the remote repository, which may trigger automated releases. Ensure you have updated pyproject.toml with the new version and committed all changes before running this command.

Pre-commit Hooks

This project uses pre-commit hooks to ensure code quality:

install pre-commit

Building Documentation

# Build documentation
make docs

# View documentation (macOS)
open docs/build/html/index.html

# View documentation (Linux)
xdg-open docs/build/html/index.html

Testing

# Run basic tests
make test

# Run tests with coverage (requires 95% coverage)
make test-cov

# Run specific test file
uv run pytest tests/test_example.py -v

Project Structure

.
├── .config/                   # Configuration tooling files
├── .github/
│   ├── workflows/            # CI/CD workflows
│   └── CODEOWNERS            # Code ownership file
├── src/
│   └── ds_provider_postgresql_py_lib/     # Rename to your module name
│       └── __init__.py
├── .pre-commit-config.yaml   # Pre-commit hooks configuration
├── tests/                    # Test files
├── docs/                     # Sphinx documentation
├── LICENSE-APACHE            # License file
├── pyproject.toml            # Project configuration
├── Makefile                  # Development commands
├── codecov.yaml              # Codecov configuration
├── CONTRIBUTING.md           # Contribution guidelines
├── PyPI.md                   # PyPI publishing guide
├── README.md                 # This file

Features

  • Modern Python Tooling: Uses uv for fast dependency management
  • Type Safety: Strict mypy configuration with full type hints
  • Code Quality: Ruff for linting and formatting
  • Testing: Pytest with 95% coverage requirement
  • Documentation: Sphinx with autoapi for automatic API docs
  • CI/CD: GitHub Actions for testing, building, and publishing
  • Pre-commit Hooks: Automated code quality checks
  • Docker Support: Containerized build environment

Requirements

  • Python 3.11+
  • uv package manager
  • Make (for development commands)

Documentation

License

This package is licensed under the Apache License 2.0. See LICENSE-APACHE for details.