This release is a pre-release and may not be stable for production use.
vivadb-py
A python wrapper around vivadb.
Installation
Install through pip (or your favorite dependency manager):
pip install vivadb-py
Commands
The package comes bundled with the vivadb executable and has all its subcommands.
config - Database Configuration
Configure your PostgreSQL connection settings and save them to environment files.
vivadb config [OPTIONS]
Options:
--host- PostgreSQL host (default: localhost)--port- PostgreSQL port (default: 5432)--user- PostgreSQL username--password- Password (not recommended for production)--password-stdin- Input password securely from stdin--dbname- Database name--prod- Write to production environment file-h, --help- Show help for this command
Examples:
# Configure development database with secure password input
vivadb config --host=localhost --port=5432 --user=myuser --dbname=postgres --password-stdin
# Configure production database
vivadb config --host=prod-server --use= prod_user --dbname=production_db --prod --password-stdin
exec - Execute SQL Queries
Execute SQL queries with production awareness and optional safety checks.
vivadb exec [OPTIONS]
Options:
-q, --query- SQL query to execute-s, --safe- Execute only safe queries-p, --prod- Run in production environment-h, --help- Show help for this command
Examples:
# Execute a safe query in development
vivadb exec --query="SELECT * FROM users LIMIT 10;" --safe
# Execute query in production (use with caution)
vivadb exec --query="UPDATE users SET status = 'active' WHERE created_at > '2024-01-01';" --prod
new - Create New Project
Create a new project with database integration and optional Docker setup.
vivadb new [OPTIONS]
Options:
--host- PostgreSQL host--port- PostgreSQL port--user- PostgreSQL username--password- Password (not recommended)--password-stdin- Input password securely from stdin--dbname- Database name--prod- Configure for production--docker- Create Docker Compose configuration-h, --help- Show help for this command
Examples:
# Create new project with Docker setup
vivadb new --project-name=hello_world --docker --host=localhost --port=5432 --user=myuser --dbname=postgres --password-stdin
migrate - Database Migrations
Update your database schema in a production-aware manner.
vivadb migrate [OPTIONS]
Options:
--prod- Run migration in production environment-h, --help- Show help for this command
Examples:
# Run migrations in development
vivadb migrate
# Run migrations in production
vivadb migrate --prod
Environment Files
vivadb manages separate environment files for development and production:
- Development:
.vivadb/.env.local - Production:
.vivadb/.env
This separation helps prevent accidental operations on production databases during development.
Security Best Practices
-
Use
--password-stdin: Always use the--password-stdinflag instead of--passwordto avoid exposing credentials in your shell history. -
Production flag: Always use the
--prodflag when working with production databases to ensure proper environment separation. -
Safe queries: Use the
--safeand/or--prodflag with theexeccommand when possible to enable additional safety checks.
Project Structure
When using vivadb new, the tool creates a project structure optimized for database-driven applications, including:
- Environment configuration files
- Optional Docker Compose setup for local PostgreSQL
- Project scaffolding with database integration
Here is how a project would look like:
.
├── .gitignore
├── .vivadb
│ ├── .env.local
│ └── compose.yaml
├── README.md
└── schema.v.sql
Contributing
Contributions are more than welcome! Find the contribution guidelines here
License
This project is distributed under an MIT License
Support
For issues and questions, please create an issue in the repository.
Metadata
Release files for vivadb-py 0.1.1a0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vivadb_py-0.1.1a0.tar.gz | 11.4 kB | Without provenance | Details for vivadb_py-0.1.1a0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vivadb_py-0.1.1a0-py3-none-any.whl | Python 3 | none | any | Details for vivadb_py-0.1.1a0-py3-none-any.whl |
Total release size: 15.3 kB
Release files / vivadb_py-0.1.1a0.tar.gz
| Download URL | vivadb_py-0.1.1a0.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
816ae1dc5825611e01850de23a07b7f69170dbc4d0fb9000a8cd096aaeb16e7e
|
|
BLAKE2b-256 checksum How to use checksums |
91f46306d35f4f9919387c5a78b20eb5eb369acadaf437d7f0a84eb516b03cb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|
Release files / vivadb_py-0.1.1a0-py3-none-any.whl
| Download URL | vivadb_py-0.1.1a0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
506920cdbd85e83f04af8c79c77fb34cadd97562f157838009cc4fe16055844e
|
|
BLAKE2b-256 checksum How to use checksums |
ab2e8aa70289e0760ebe0439903c468fae16e9d4a6591417a0aa52979b93581c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|
Security for vivadb-py 0.1.1a0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.