Skip to main content

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://travis-ci.org/kingsdigitallab/django-geonames-place.svg?branch=master
:target: https://travis-ci.org/kingsdigitallab/django-geonames-place

.. image:: https://codecov.io/gh/kingsdigitallab/django-geonames-place/branch/master/graph/badge.svg
:target: https://codecov.io/gh/kingsdigitallab/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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-geonames-place-0.2.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

django_geonames_place-0.2.0-py2.py3-none-any.whl (8.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django-geonames-place-0.2.0.tar.gz.

File metadata

  • Download URL: django-geonames-place-0.2.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for django-geonames-place-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5f03b479a2f743fce50e27192e990455be49d3f12c9bac2ec5836e2173da4b85
MD5 955c7ae90c1504ff6e05d945bf398b79
BLAKE2b-256 dab4d088363410be36d2fb1e1ad30fc96dc0ac4fa534797ca5e30225ab3586ec

See more details on using hashes here.

File details

Details for the file django_geonames_place-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: django_geonames_place-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for django_geonames_place-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 da6294db1ea699e8175b11b46a24d5bec98026e66b74e3726e0faf35f8fb7366
MD5 387f4b0d03f1a879fa5b84ea0bf65627
BLAKE2b-256 7306fd4f21af66a679dbca1ca8ef2154b28cadc7af1fa0ee4ab9b90538e9a20c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page