Skip to main content

High-Level Database Client for OpenGov Permitting & Licensing

Project description

ogplc

High-Level Database Client for OpenGov Permitting & Licensing

install

pip install ogplc

cli usage

# dump to a datasets folder
ogplc dump --username="myusername" --password="mypassword" --server="myserver" --database="mydatabase" --output="$PWD/datasets"

python usage

import ogplc

ogplc.dump(
    server = "server_host",
    database = "database_name",
    username = "username",
    password = "password",

    # folder where to save output files
    output = "/home/users/documents/datasets",

    # optional parameters below
    driver = "SQL Server",

    # only include these record types in results
    record_types = ["Skyscraper Permit"],

    # exclude these record types from results
    skip_record_types = ["Orchard Permit"],

    # maximum number of rows in output dataset for each record type
    max_rows = 1000,

    # number of seconds to wait between database queries
    wait = 0,

    # remove new line from databse results
    # this can help improve readibility
    remove_new_lines = True,

    # delimiter to pass to csv writer
    delimiter = ",",

    # logging level
    debug_level = 1
)

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

ogplc-0.0.1.tar.gz (9.0 kB view details)

Uploaded Source

File details

Details for the file ogplc-0.0.1.tar.gz.

File metadata

  • Download URL: ogplc-0.0.1.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for ogplc-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0d2be993b25180c9f09dcf705fdbbfd898c5e40ca12d539a9bf57466d03f5d4b
MD5 901ac93408975b10b68a68deb7d62ed0
BLAKE2b-256 9294e4fb613293d013068d97a160357b1d78c03dfa0aa8345ac888799b319d82

See more details on using hashes here.

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