Skip to main content

Planningalerts Data Library

https://img.shields.io/bitbucket/pipelines/otherchirps/morph_planningalerts.svg

Aims to provide a simple, standardised perisistance layer for PlanningAlerts records.

Mainly intended to use when writing PlanningAlerts scrapers on morph.io. Morph python environments already have nice libraries, like scraperwiki installed, but those don’t enforce the data requirements expected by PlanningAlerts. This library attempts to do so.

Installation

From source

python setup.py install

pip

pip install morph_planningalerts

Usage

from morph_planningalerts import DevelopmentApplication, MorphDatabase

# Make sure the database file exists. If it does, this won't do anything.
MorphDatabase.init()

# Time passes... data is scraped...
new_record = DevelopmentApplication.create(
    council_reference='M123/456',
    address='64 Zoo Lane',
    description='this is the least info needed to prevent explosions',
    info_url='http://detail_page_about_application',
    comment_url='http://some_feedback_url'
)

# Or, if you only want to insert new records:
record, was_created = DevelopmentApplication.create_or_get(
    council_reference=...
)

For more examples, check out the docs on querying with the Peewee ORM.

Source code

You can get the code here:

https://bitbucket.org/otherchirps/morph_planningalerts

Testing

tox is being used to run the tests across python 2.7 & 3.x.

To bootstrap your test environment, the easiest way is you use the pip requirements file:

pip install -r requirements.txt

Then you can simply run:

tox

Metadata

Release files for morph_planningalerts 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for morph_planningalerts 1.0.1
File Size Uploaded Provenance Actions
morph_planningalerts-1.0.1.tar.gz 4.1 kB Without provenance Details for morph_planningalerts-1.0.1.tar.gz

Release files / morph_planningalerts-1.0.1.tar.gz

Download URL morph_planningalerts-1.0.1.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
48353ad567b8898a0912d5840c5be7fcd23c31c2f1e5383880b73714a03f84cb
BLAKE2b-256 checksum
How to use checksums
305c6b455fa6fbfa0489144fad329eb68436b9ed8ce6a2bacee063f810e78828
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

Security for morph_planningalerts 1.0.1

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.

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page