Application to access Geonames Places directly from Django.
Project description
The application can create places by using a geonames id or by using a search address.
Home-page: https://github.com/kingsdigitallab/django-geonames-place
Author: Miguel Vieira
Author-email: jmvieira@gmail.com
License: MIT
Description: =============================
Django Geonames Place
=============================
.. image:: https://badge.fury.io/py/django-geonames-place.svg
:target: https://badge.fury.io/py/django-geonames-place
.. image:: https://travis-ci.org/jmiguelv/django-geonames-place.svg?branch=master
:target: https://travis-ci.org/jmiguelv/django-geonames-place
.. image:: https://codecov.io/gh/jmiguelv/django-geonames-place/branch/master/graph/badge.svg
:target: https://codecov.io/gh/jmiguelv/django-geonames-place
Application to access Geonames Places directly from Django.
The application can create places by using a geonames id or by using a search address.
This application depends on the very useful `Python Geocoder <https://geocoder.readthedocs.io/index.html>`_ library.
Documentation
-------------
The full documentation is at https://django-geonames-place.readthedocs.io.
Quickstart
----------
Install Django Geonames Place::
pip install django-geonames-place
Add it to your `INSTALLED_APPS`:
.. code-block:: python
INSTALLED_APPS = (
...
'geonames_place.apps.GeonamesPlaceConfig',
...
)
Add the settings `GEONAMES_KEY` and `GEONAMES_MAX_RESULTS`. The `GEONAMES_KEY`
is your Geoname API key, and the `GEONAMES_MAX_RESULTS` is used to set the
maximum number of results when searching Geonames.
.. code-block:: python
GEONAMES_KEY = '<GEONAMES_USERNAME>'
GEONAMES_MAX_RESULTS = 10
To reference Geonames Place in your models:
.. code-block:: python
from django.db import models
from geonames_place.models import Place
class MyModel(models.Model):
...
place = models.ForeignKey(Place, on_delete=models.CASCADE)
...
]
Features
--------
* TODO
Running Tests
-------------
Does the code actually work?
::
export GEONAMES_KEY=<GEONAMES_USERNAME>
source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox
Credits
-------
Tools used in rendering this package:
* Cookiecutter_
* `cookiecutter-djangopackage`_
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage
History
-------
0.1.0 (2018-11-13)
++++++++++++++++++
* First release on PyPI.
Keywords: django-geonames-place
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django :: 2.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Home-page: https://github.com/kingsdigitallab/django-geonames-place
Author: Miguel Vieira
Author-email: jmvieira@gmail.com
License: MIT
Description: =============================
Django Geonames Place
=============================
.. image:: https://badge.fury.io/py/django-geonames-place.svg
:target: https://badge.fury.io/py/django-geonames-place
.. image:: https://travis-ci.org/jmiguelv/django-geonames-place.svg?branch=master
:target: https://travis-ci.org/jmiguelv/django-geonames-place
.. image:: https://codecov.io/gh/jmiguelv/django-geonames-place/branch/master/graph/badge.svg
:target: https://codecov.io/gh/jmiguelv/django-geonames-place
Application to access Geonames Places directly from Django.
The application can create places by using a geonames id or by using a search address.
This application depends on the very useful `Python Geocoder <https://geocoder.readthedocs.io/index.html>`_ library.
Documentation
-------------
The full documentation is at https://django-geonames-place.readthedocs.io.
Quickstart
----------
Install Django Geonames Place::
pip install django-geonames-place
Add it to your `INSTALLED_APPS`:
.. code-block:: python
INSTALLED_APPS = (
...
'geonames_place.apps.GeonamesPlaceConfig',
...
)
Add the settings `GEONAMES_KEY` and `GEONAMES_MAX_RESULTS`. The `GEONAMES_KEY`
is your Geoname API key, and the `GEONAMES_MAX_RESULTS` is used to set the
maximum number of results when searching Geonames.
.. code-block:: python
GEONAMES_KEY = '<GEONAMES_USERNAME>'
GEONAMES_MAX_RESULTS = 10
To reference Geonames Place in your models:
.. code-block:: python
from django.db import models
from geonames_place.models import Place
class MyModel(models.Model):
...
place = models.ForeignKey(Place, on_delete=models.CASCADE)
...
]
Features
--------
* TODO
Running Tests
-------------
Does the code actually work?
::
export GEONAMES_KEY=<GEONAMES_USERNAME>
source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox
Credits
-------
Tools used in rendering this package:
* Cookiecutter_
* `cookiecutter-djangopackage`_
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage
History
-------
0.1.0 (2018-11-13)
++++++++++++++++++
* First release on PyPI.
Keywords: django-geonames-place
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django :: 2.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-geonames-place-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a3e9d90d3c8bcb92a5f4af464baa94c4b6287d61ae4b69926c6d0440be86e46 |
|
MD5 | e23232bca7e6268dfca00658078dc4a0 |
|
BLAKE2b-256 | dd4c41debf7bd544e46dc18a38ef9a8346ead0a41fe357be61409ef0986c4440 |
Close
Hashes for django_geonames_place-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd9e92835cc08f4294b43147c9baf16aa423cbe37c86a67125c3e2723802b440 |
|
MD5 | b52c8735515854ddcf3e37213ba4419a |
|
BLAKE2b-256 | 78f0507d2dfc22ddd8c5faf9207665d9b509b25a0b4957574604a5b234aefef4 |