dbit


Namedbit JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryGit-like CLI tool for database schema version control with multi-database support
upload_time2025-07-28 23:51:54
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords database schema version-control migration git postgresql mysql sqlite devops database-management
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # dbit - Database Schema Version Control

[![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://python.org)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A Git-like CLI tool for managing database schemas with version control capabilities.

## Features

- Git-like interface for database schema management
- Support for PostgreSQL, MySQL, and SQLite
- Schema snapshots and version tracking
- Schema quality validation
- Change detection and comparison


## Installation

### Using PyPI (Recommended)
```bash
pip install dbit
```

### Using GitHub (Latest)
```bash
pip install git+https://github.com/navaneetnr/dbit.git
```

### From Source (Development)
```bash
git clone https://github.com/navaneetnr/dbit.git
cd dbit
python -m venv venv
source venv/bin/activate
pip install -e .
```

### With Docker
```bash
docker pull ghcr.io/navaneetnr/dbit:latest
# Or build locally for development:
docker build --target development -t dbit:dev .
```


## Usage Example

For a full list of commands and options, run:

```bash
dbit help
# or
dbit --help
# or
dbit -h
```

Common usage:

```bash
# Initialize a dbit repository in your project
dbit init

# Connect to your database
dbit connect --db-url postgresql://user:password@localhost/dbname

# Take a schema snapshot
dbit snapshot

# See changes since last snapshot
dbit status

# View schema change history
dbit log

# Run schema quality checks
dbit verify
```

## Commands
---------------------------------------------------------------------
|           Command              |           Description            |
|--------------------------------|----------------------------------|
| `dbit --help`                  | For full list of commands        |
| `dbit init`                    | Initialize a new dbit repository |
| `dbit connect --db-url <url>`  | Connect to a database            |
| `dbit disconnect`              | Disconnect from current database |
| `dbit snapshot [--content N]`  | Create schema snapshot           |
| `dbit status [--content N]`.   | Show changes since last snapshot |
| `dbit log`                     | Show change history              |
| `dbit verify`                  | Verify schema quality            |
---------------------------------------------------------------------
## Connection Strings

```bash
# PostgreSQL
postgresql://user:password@host:port/database

# MySQL
mysql://user:password@host:port/database

# SQLite
sqlite:///path/to/database.db
```

## Configuration

dbit stores configuration in `.dbit/schema.yaml`:

```yaml
db: postgresql://user:password@localhost/dbname
migrations: []
current_version: v1.json
```


## Documentation

- [Contributing Guide](docs/CONTRIBUTING.md)
- [Code of Conduct](CODE_OF_CONDUCT.md)

## Contributing

If you want to contribute to dbit, follow these steps:

### Quick Developer Setup

Use the provided script to set up your environment:

```bash
./scripts/setup-dev.sh
```

This will:
- Check your Python version (3.8+ required)
- Create and activate a virtual environment (`venv`)
- Upgrade pip
- Install all development dependencies
- Install pre-commit hooks
- Run pre-commit on all files

After setup, activate your environment with:
```bash
source venv/bin/activate
```

Run tests with:
```bash
pytest
```

Run all pre-commit checks manually with:
```bash
pre-commit run --all-files
```

### Manual Setup (Alternative)
1. Fork the repository
2. Clone your fork: `git clone https://github.com/YOUR_USERNAME/dbit.git`
3. Create a virtual environment and activate it:
   ```bash
   python -m venv venv
   source venv/bin/activate
   ```
4. Install development dependencies:
   ```bash
   pip install -e ".[dev]"
   ```
5. Install pre-commit hooks:
   ```bash
   pre-commit install
   ```
6. Create a feature branch, make your changes, run tests (`pytest`), and submit a pull request.

### Development with Docker

```bash
# Build development image
docker build --target development -t dbit:dev .

# Run development container
# Mount your code for live editing
# (from project root)
docker run -it --rm -v $(pwd):/app dbit:dev
```


## License

MIT License - see [LICENSE](LICENSE) file for details.


## Support

- Issues: [GitHub Issues](https://github.com/navaneetnr/dbit/issues)
- Discussions: [GitHub Discussions](https://github.com/navaneetnr/dbit/discussions)

## Author
N R Navaneet

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "dbit",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Navaneet <navaneetnr@gmail.com>",
    "keywords": "database, schema, version-control, migration, git, postgresql, mysql, sqlite, devops, database-management",
    "author": null,
    "author_email": "Navaneet <navaneetnr@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/eb/1f/80919fe51d099803223c6306b04afa0cf205ebfe9cc766bdea46588dba5a/dbit-0.1.0.tar.gz",
    "platform": null,
    "description": "# dbit - Database Schema Version Control\n\n[![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://python.org)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA Git-like CLI tool for managing database schemas with version control capabilities.\n\n## Features\n\n- Git-like interface for database schema management\n- Support for PostgreSQL, MySQL, and SQLite\n- Schema snapshots and version tracking\n- Schema quality validation\n- Change detection and comparison\n\n\n## Installation\n\n### Using PyPI (Recommended)\n```bash\npip install dbit\n```\n\n### Using GitHub (Latest)\n```bash\npip install git+https://github.com/navaneetnr/dbit.git\n```\n\n### From Source (Development)\n```bash\ngit clone https://github.com/navaneetnr/dbit.git\ncd dbit\npython -m venv venv\nsource venv/bin/activate\npip install -e .\n```\n\n### With Docker\n```bash\ndocker pull ghcr.io/navaneetnr/dbit:latest\n# Or build locally for development:\ndocker build --target development -t dbit:dev .\n```\n\n\n## Usage Example\n\nFor a full list of commands and options, run:\n\n```bash\ndbit help\n# or\ndbit --help\n# or\ndbit -h\n```\n\nCommon usage:\n\n```bash\n# Initialize a dbit repository in your project\ndbit init\n\n# Connect to your database\ndbit connect --db-url postgresql://user:password@localhost/dbname\n\n# Take a schema snapshot\ndbit snapshot\n\n# See changes since last snapshot\ndbit status\n\n# View schema change history\ndbit log\n\n# Run schema quality checks\ndbit verify\n```\n\n## Commands\n---------------------------------------------------------------------\n|           Command              |           Description            |\n|--------------------------------|----------------------------------|\n| `dbit --help`                  | For full list of commands        |\n| `dbit init`                    | Initialize a new dbit repository |\n| `dbit connect --db-url <url>`  | Connect to a database            |\n| `dbit disconnect`              | Disconnect from current database |\n| `dbit snapshot [--content N]`  | Create schema snapshot           |\n| `dbit status [--content N]`.   | Show changes since last snapshot |\n| `dbit log`                     | Show change history              |\n| `dbit verify`                  | Verify schema quality            |\n---------------------------------------------------------------------\n## Connection Strings\n\n```bash\n# PostgreSQL\npostgresql://user:password@host:port/database\n\n# MySQL\nmysql://user:password@host:port/database\n\n# SQLite\nsqlite:///path/to/database.db\n```\n\n## Configuration\n\ndbit stores configuration in `.dbit/schema.yaml`:\n\n```yaml\ndb: postgresql://user:password@localhost/dbname\nmigrations: []\ncurrent_version: v1.json\n```\n\n\n## Documentation\n\n- [Contributing Guide](docs/CONTRIBUTING.md)\n- [Code of Conduct](CODE_OF_CONDUCT.md)\n\n## Contributing\n\nIf you want to contribute to dbit, follow these steps:\n\n### Quick Developer Setup\n\nUse the provided script to set up your environment:\n\n```bash\n./scripts/setup-dev.sh\n```\n\nThis will:\n- Check your Python version (3.8+ required)\n- Create and activate a virtual environment (`venv`)\n- Upgrade pip\n- Install all development dependencies\n- Install pre-commit hooks\n- Run pre-commit on all files\n\nAfter setup, activate your environment with:\n```bash\nsource venv/bin/activate\n```\n\nRun tests with:\n```bash\npytest\n```\n\nRun all pre-commit checks manually with:\n```bash\npre-commit run --all-files\n```\n\n### Manual Setup (Alternative)\n1. Fork the repository\n2. Clone your fork: `git clone https://github.com/YOUR_USERNAME/dbit.git`\n3. Create a virtual environment and activate it:\n   ```bash\n   python -m venv venv\n   source venv/bin/activate\n   ```\n4. Install development dependencies:\n   ```bash\n   pip install -e \".[dev]\"\n   ```\n5. Install pre-commit hooks:\n   ```bash\n   pre-commit install\n   ```\n6. Create a feature branch, make your changes, run tests (`pytest`), and submit a pull request.\n\n### Development with Docker\n\n```bash\n# Build development image\ndocker build --target development -t dbit:dev .\n\n# Run development container\n# Mount your code for live editing\n# (from project root)\ndocker run -it --rm -v $(pwd):/app dbit:dev\n```\n\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n\n## Support\n\n- Issues: [GitHub Issues](https://github.com/navaneetnr/dbit/issues)\n- Discussions: [GitHub Discussions](https://github.com/navaneetnr/dbit/discussions)\n\n## Author\nN R Navaneet\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Git-like CLI tool for database schema version control with multi-database support",
    "version": "0.1.0",
    "project_urls": {
        "Changelog": "https://github.com/navaneetnr/dbit/blob/main/CHANGELOG.md",
        "Discussions": "https://github.com/navaneetnr/dbit/discussions",
        "Documentation": "https://github.com/navaneetnr/dbit/blob/main/docs",
        "Homepage": "https://github.com/navaneetnr/dbit",
        "Issues": "https://github.com/navaneetnr/dbit/issues",
        "Repository": "https://github.com/navaneetnr/dbit"
    },
    "split_keywords": [
        "database",
        " schema",
        " version-control",
        " migration",
        " git",
        " postgresql",
        " mysql",
        " sqlite",
        " devops",
        " database-management"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c059f8312528800244173b1948e0cac2eb2c5138ba29957b58577aed7cc8b5af",
                "md5": "50b9dfdc8060738703bbc332b896115a",
                "sha256": "6a837be7a833c769d9e61a23229f727a1102c29dd95e9a3767e864afff010029"
            },
            "downloads": -1,
            "filename": "dbit-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "50b9dfdc8060738703bbc332b896115a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 20684,
            "upload_time": "2025-07-28T23:51:51",
            "upload_time_iso_8601": "2025-07-28T23:51:51.796929Z",
            "url": "https://files.pythonhosted.org/packages/c0/59/f8312528800244173b1948e0cac2eb2c5138ba29957b58577aed7cc8b5af/dbit-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "eb1f80919fe51d099803223c6306b04afa0cf205ebfe9cc766bdea46588dba5a",
                "md5": "32699a42c2769bc4144f5d125a07a2d3",
                "sha256": "53a1d3561f6aaee88167beb910cc2d6baa3bc34a28a8b32aa94ac0146fa6df30"
            },
            "downloads": -1,
            "filename": "dbit-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "32699a42c2769bc4144f5d125a07a2d3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 28347,
            "upload_time": "2025-07-28T23:51:54",
            "upload_time_iso_8601": "2025-07-28T23:51:54.299745Z",
            "url": "https://files.pythonhosted.org/packages/eb/1f/80919fe51d099803223c6306b04afa0cf205ebfe9cc766bdea46588dba5a/dbit-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-28 23:51:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "navaneetnr",
    "github_project": "dbit",
    "github_not_found": true,
    "lcname": "dbit"
}
        
Elapsed time: 1.07878s