PyCrime
Fetch crime statistics from the ExpenseCheck crime statistics API.
Installation
PyPi is the easiest:
pip install pycrime
Usage
Create a new API client with:
from pycrime import CrimeClient
client = CrimeClient(jwt=<your-token>)
Please replace <your-token> with your API token as a string.
Fetch crime statistics based on postcode with:
client.locality_statistics(3000)
Here, the postcode for Melbourne's CBD, 3000, has been used. Please
substitute for the postcode of interest. The return value is a dict
containing shaped like the following:
{
'localityTheftRate': 27524.8484848485, # per 100k population
'stateTheftRate': 3448.8149871704, # per 100k population
'theftStateAnomaly': 698.0958267475 # percentage
}
Metadata
Release files for pycrime 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pycrime-0.0.6.tar.gz | 2.9 kB | Without provenance | Details |
Release files / pycrime-0.0.6.tar.gz
| Download URL | pycrime-0.0.6.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4cd474db77f040bd0790f4f1a86a0716d9e8e21700a3815ffa638bfc396bc714
|
|
BLAKE2b-256 checksum How to use checksums |
26758b41ea3b6c11bf3a089bbd1260f3c46c37f3b2e414348c463da71526e727
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/43.0.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.8.1
|
Security for pycrime 0.0.6
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.