Skip to main content

Parse and model Dallas Central Appriasal District data

Project description

https://travis-ci.com/hydrospanner/dcad_parser.svg?branch=master

This repo provides tools for fast DB integration of data from the Dallas Central Appraisal District (DCAD). This includes

  • A CLI to generate SQLAlchemy models by parsing a data dictionary and flask-sqlacodegen.

  • A parser for DCAD’s table exports for parsing, coersion, and validation.

Data Model CLI

Parse the Dallas Central Appraisal District (DCAD) data dictionary into sqlalchemy metadata. Use the generated metadata to generate Flask-SQLAlchemy model code, using flask-sqlacodegen.

This will convert this data dictionary structure:

TABLE [ABATEMENT_EXEMPT]                Table containing information for abatement if applicable
        [ACCOUNT_NUM]                   The DCAD Account number
        [APPRAISAL_YR]                  The appraisal year for the data
        [TOT_VAL]                       The total value for the property

into

from flask_sqlalchemy import SQLAlchemy


db = SQLAlchemy()



class AbatementExempt(db.Model):
    __tablename__ = 'abatement_exempt'

    account_num = db.Column(db.Integer, primary_key=True, nullable=False, info='The DCAD Account number')
    appraisal_yr = db.Column(db.Integer, primary_key=True, nullable=False, info='The appraisal year for the data')
    tot_val = db.Column(db.Float, info='The total value for the property')

Example (using the entery point)

generate_sqlalchemy path/to/file.txt --outfile models.py --flask

To see the full list of options

generate_sqlalchemy --help

Table Parser

This parser functions as a dictionary parser for the invidual table exports. It also coerces and validates the data. It uses the same naming convention logic to identify field types as the Data Model process.

Where to get it

[PyPI](https://pypi.org/project/dcad-parser-hydrospanner/)

pip install dcad-parser-hydrospanner

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

dcad-parser-hydrospanner-0.1.1.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

dcad_parser_hydrospanner-0.1.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file dcad-parser-hydrospanner-0.1.1.tar.gz.

File metadata

  • Download URL: dcad-parser-hydrospanner-0.1.1.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.5

File hashes

Hashes for dcad-parser-hydrospanner-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5f0de9e04fa9f8d9ab8d2652c25f1fb6fd7f35cb261e15f58fd0fbdca4367975
MD5 129a685b2a014f5faede9f1230bd3e35
BLAKE2b-256 ac44af986f34c42c9da75b04ce2e75bed41290fdf0813536962f6f6ee1485fb0

See more details on using hashes here.

File details

Details for the file dcad_parser_hydrospanner-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: dcad_parser_hydrospanner-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.5

File hashes

Hashes for dcad_parser_hydrospanner-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ec3e32cc965327d354ae29c421598009c607a9d712e636b0559e8cffc86de231
MD5 ec122ca2f073e76e4222e3d283fedd90
BLAKE2b-256 7613db547c8a83def52d86b4fcd3ff424eaa4a7cd378dbc9f8b0b9a05f2d4182

See more details on using hashes here.

Supported by

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