A Django application for calculating geohashes and exposing them
via RESTful interface. Requires Django 1.8.x+ (takes advantage of
updated argument parsing for custom management commands, see:
[Django 1.8 Release Notes][1] for more information).
## Installation
Install with pip:
```bash
pip install django-geohashing
```
## Quick Start
1. Add "geohashing" and "rest_framework" to your INSTALLED_APPS:
```python
INSTALLED_APPS = (
...
'geohashing',
'rest_framework',
)
```
2. Create the geohashing tables by resyncing your models:
```bash
python manage.py migrate
```
3. Populate the table using the `get_historical_djia` management command:
```bash
python manage.py get_historical_djia --start <date> --end <date>
```
The `get_historical_djia` command takes two optional parameters:
`--start` and `--end`. These parameters accept date strings of the format
`YYYY-MM-DD`. They may be used to limit the set of results from
which to database is populated (so for instance to only retrieve and process
only the 30 most recent DJIA openings instead of every opening since 1928).
The parameters are optional but their use is very much encouraged; otherwise
tens of thousands of records will be retrieved and imported individually.
4. To expose the geohashing offsets via REST API, include `geohashing.urls` in
your `urls.py`. Though not strictly required, as a best practice a namespace
for the urls should be provided:
```python
from django.conf.urls import url
urlpatterns = [
url(r'^geohashing/', include('geohashing.urls', namespace='geohashing')),
]
```
## TODO
This project is still in an extremely early alpha stage. Tasks that still need
to be tackled:
- Update the importer to:
- Handle the creation of new Day objects and the update of existing Day
objects seperately so that we can use `bulk_create` to improve
performance.
- Extrapolate data points beyond the maximum date when enough information
is available to do so.
- Add a `get_current_djia` management command to be used for retrieving
today's opening value. Occasionally the various sources for the opening
value are initially inconsistent with one another. The management command
should handle this gracefully by waiting for consensus.
- Add unit tests and docs
- Run Flake8 against the codebase and fix any glaring PEP-8 violations
- Set up Continuous Integration...integration
[1]: https://docs.djangoproject.com/en/1.8/releases/1.8/#extending-management-command-arguments-through-command-option-list
Metadata
Release files for django-geohashing 0.2.1
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 | Actions |
|---|---|---|---|---|
| django-geohashing-0.2.1.tar.gz | 8.7 kB | Without provenance | Details for django-geohashing-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_geohashing-0.2.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for django_geohashing-0.2.1-py2.py3-none-any.whl |
Total release size: 21.1 kB
Release files / django-geohashing-0.2.1.tar.gz
| Download URL | django-geohashing-0.2.1.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
abba4d264f4b9251413a7a45124587c11378411567f07d04648ed216f18c3f5a
|
|
BLAKE2b-256 checksum How to use checksums |
70c1f4e6111f1aee4385dd14d26d1d2a52d9478af8b9b7b1cdaab68f247f1907
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_geohashing-0.2.1-py2.py3-none-any.whl
| Download URL | django_geohashing-0.2.1-py2.py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
2b8f4cac09b097c11c01d81e8532b104b84ed27bf312be34da5f808cc4d155bb
|
|
BLAKE2b-256 checksum How to use checksums |
1cd22d768eeebf44e548e2285f4f7a24161415486ea6879ca5fb2374eab4a669
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-geohashing 0.2.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.