Skip to main content

A Python-based tool for tracking Oracle database object DDL with git

Project description

Oracle Object Tracker

oracle-object-tracker-ci Supported Python Versions PyPI version PyPI Downloads

The Oracle Object Tracker is a command-line utility that allows you to export Oracle database objects (like tables, views, procedures, etc.) as DDL files. It supports filtering by object name patterns and can push the exported files to a specified Git repository.

Install package

You can install oracle-object-tracker from source.

Option 1 - from PyPi

# Create the virtual environment
python3 -m venv .venv

# Activate the virtual environment
. .venv/bin/activate

pip install oracle-object-tracker

Option 2 - from source - for development

git clone https://github.com/TruckCab/oracle-object-tracker.git

cd oracle-object-tracker

# Create the virtual environment
python3 -m venv .venv

# Activate the virtual environment
. .venv/bin/activate

# Upgrade pip, setuptools, and wheel
pip install --upgrade pip setuptools wheel

# Install the package - in editable mode with dev dependencies
pip install --editable .[dev]

Note

For the following commands - if you running from source and using --editable mode (for development purposes) - you will need to set the PYTHONPATH environment variable as follows:

export PYTHONPATH=$(pwd)/src

Usage

Help

oracle-object-tracker --help
Usage: oracle-object-tracker [OPTIONS]

Options:
  --version / --no-version        Prints the Oracle Object Tracker version and
                                  exits.  [required]
  --username TEXT                 The Oracle database username to connect
                                  with.  Defaults to environment variable
                                  DATABASE_USERNAME if set.  [required]
  --password TEXT                 The Oracle database password to connect
                                  with.  Defaults to environment variable
                                  DATABASE_PASSWORD if set.  [required]
  --hostname TEXT                 The Oracle database hostname to connect to.
                                  Defaults to environment variable
                                  DATABASE_HOSTNAME if set.  [required]
  --service-name TEXT             The Oracle database service name to connect
                                  to.  Defaults to environment variable
                                  DATABASE_SERVICE_NAME if set.  [required]
  --port INTEGER                  The Oracle database port to connect to.
                                  Defaults to environment variable
                                  DATABASE_PORT if set, or 1521 if not set.
                                  [default: 1521; required]
  --schema TEXT                   The schema to export objects for, may be
                                  specified more than once.  Defaults to the
                                  database username.  [required]
  --object-type TEXT              The object types to export.  [default:
                                  CLUSTER, DATABASE LINK, FUNCTION, INDEX,
                                  JAVA SOURCE, JOB, MATERIALIZED VIEW,
                                  MATERIALIZED VIEW LOG, PACKAGE, PACKAGE
                                  BODY, PROCEDURE, SEQUENCE, SYNONYM, TABLE,
                                  TRIGGER, TYPE, TYPE BODY, VIEW; required]
  --object-name-include-pattern TEXT
                                  The regexp pattern to use to filter object
                                  names to include in the export.  [default:
                                  .*; required]
  --object-name-exclude-pattern TEXT
                                  The regexp pattern to use to filter object
                                  names to exclude in the export.
  --output-directory TEXT         The path to the output directory - may be
                                  relative or absolute.  [required]
  --overwrite / --no-overwrite    Controls whether to overwrite any existing
                                  DDL export files in the output path.
                                  [default: no-overwrite; required]
  --git-repo TEXT                 Allows you to specify a git repository to
                                  push the output files to.  The repository
                                  must be accessible via SSH. Example:
                                  git@github.com:some-org/some-repo.git See: h
                                  ttps://docs.github.com/en/authentication/con
                                  necting-to-github-with-ssh/adding-a-new-ssh-
                                  key-to-your-github-account for more
                                  information on setting up SSH keys for
                                  GitHub.
  --git-branch TEXT               Specify the git branch to push to - if the
                                  --git-repo arg is used.  [default: main]
  --log-level TEXT                The logging level to use for the
                                  application.  [default: INFO; required]
  --help                          Show this message and exit.

Handy development commands

Version management

Bump the version of the application - (you must have installed from source with the [dev] extras)
bumpver update --patch

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oracle_object_tracker-0.0.12.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oracle_object_tracker-0.0.12-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file oracle_object_tracker-0.0.12.tar.gz.

File metadata

  • Download URL: oracle_object_tracker-0.0.12.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for oracle_object_tracker-0.0.12.tar.gz
Algorithm Hash digest
SHA256 5082354bf07d6015c8422fa702ec252e3c826b49bc00fab0097dd68a643ddf35
MD5 957cc06e776cee216e4ce7cd743a2250
BLAKE2b-256 d85403118ee30800dedb0b382cb3a68eaecd03b1143c0db418bcc77bb0afbdf1

See more details on using hashes here.

Provenance

The following attestation bundles were made for oracle_object_tracker-0.0.12.tar.gz:

Publisher: ci.yml on TruckCab/oracle-object-tracker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oracle_object_tracker-0.0.12-py3-none-any.whl.

File metadata

File hashes

Hashes for oracle_object_tracker-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 fc79f4eb1577d232bb350ad80b8612c3e23b933122a2edaf720945fc1c63508d
MD5 762216e3f44f2c4c7907eb84f6cf452e
BLAKE2b-256 adf24bde6799450e7af14658113d723f3a7cf3c7c5c9769c685865ddda1f7286

See more details on using hashes here.

Provenance

The following attestation bundles were made for oracle_object_tracker-0.0.12-py3-none-any.whl:

Publisher: ci.yml on TruckCab/oracle-object-tracker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page