geokey-webresources
Extend GeoKey projects by adding web resources: GeoJSON and KML.
Install
geokey-webresources requires:
Python version 2.7
GeoKey version 1.6 or greater
Install the geokey-webresources from PyPI:
pip install geokey-webresources
Or from cloned repository:
cd geokey-webresources
pip install -e .
Add the package to installed apps:
INSTALLED_APPS += (
...
'geokey_webresources',
)
Migrate the models into the database:
python manage.py migrate geokey_webresources
You’re now ready to go!
Update
Update the geokey-webresources from PyPI:
pip install -U geokey-webresources
Migrate the new models into the database:
python manage.py migrate geokey_webresources
Test
Run tests:
python manage.py test geokey_webresources
Check code coverage:
pip install coverage
coverage run --source=geokey_webresources manage.py test geokey_webresources
coverage report -m --omit=*/tests/*,*/migrations/*
Public API
Get all web resources of a project
GET /api/projects/:project_id/webresources/
Request parameters:
Parameter |
Type |
Description |
|---|---|---|
project_id |
Integer |
A unique identifier for the project. |
Response:
The response contains an array of web resources. If the array is empty, then the project has no active web resources.
[
{
"id": 46,
"status": "active",
"name": "Public Houses",
"description": "All public houses in London.",
"created": "2014-09-19T15:51:32.790Z",
"modified": "2014-09-21T15:51:32.804Z",
"dataformat": "KML",
"url": "http://london.co.uk/public-houses.kml",
"colour": "#000000",
"symbol": null
}
]
Response status codes:
Code |
Reason |
|---|---|
200 |
The list of web resources has been returned successfully. |
404 |
The project was not found (or user has no access to it). |
Get a single web resource of a project
GET /api/projects/:project_id/webresources/:webresource_id/
Request parameters:
Parameter |
Type |
Description |
|---|---|---|
project_id |
Integer |
A unique identifier for the project. |
webresource_id |
Integer |
A unique identifier for the web resource. |
Response:
{
"id": 46,
"status": "active",
"name": "Train Stations",
"description": "Train stations in Germany.",
"created": "2015-09-15T09:40:01.747Z",
"modified": "2016-01-10T07:12:01.827Z",
"dataformat": "GeoJSON",
"url": "https://germany.de/all-train-stations.geojson",
"colour": "#ffc0cb",
"symbol": '/media/webresources/symbols/train_stations.png'
}
Response status codes:
Code |
Reason |
|---|---|
200 |
The web resource has been returned successfully. |
404 |
The project or web resource was not found. |
Metadata
Release files for geokey-webresources 0.2.3
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 |
|---|---|---|---|---|
| geokey-webresources-0.2.3.tar.gz | 15.4 kB | Without provenance | Details for geokey-webresources-0.2.3.tar.gz |
Release files / geokey-webresources-0.2.3.tar.gz
| Download URL | geokey-webresources-0.2.3.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b930570248f314600acb3c6782c3d48ddf3e707b21c20c64119f7d48e610430
|
|
BLAKE2b-256 checksum How to use checksums |
8b2426c9d3009526915330b120df45f03e04ca05ff7f9fa5c3bd014d07c617c9
|
| 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.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.6
|
Security for geokey-webresources 0.2.3
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.