Giter Site home page Giter Site logo

yandex-geocoder's Introduction

Yandex Geocoder

Get address coordinates via Yandex geocoder

test Coverage Status Code style: black Python versions PyPi

Installation

Install it via pip tool:

pip install yandex-geocoder

or Poetry:

poetry add yandex-geocoder

Usage example

Yandex Geocoder requires an API developer key, you can get it here to use this library.

from decimal import Decimal

from yandex_geocoder import Client


client = Client("your-api-key")

coordinates = client.coordinates("Москва Льва Толстого 16")
assert coordinates == (Decimal("37.587093"), Decimal("55.733969"))

address = client.address(Decimal("37.587093"), Decimal("55.733969"))
assert address == "Россия, Москва, улица Льва Толстого, 16"

Development and contribution

First of all you should install Poetry.

  • install project dependencies
make install
  • run linters
make lint
  • run tests
make test
  • feel free to contribute!

yandex-geocoder's People

Contributors

nonvme avatar renovate[bot] avatar sivakov512 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

yandex-geocoder's Issues

Non-200 response from yandex geocoder

Hello


from yandex_geocoder import Client
Client.coordinates('Хабаровск 60 октября 150')  #  'Non-200 response from yandex `geocoder'

Maybe Yandex changed its API...

Проблема при работе на сервере

На ПК работает, деплою тот же код на сервер и получаю ошибку:
Traceback (most recent call last):
File "", line 1, in
File "/home/virtwww/w_jesuppv-rf_9d8d3c3c/django-env/lib/python3.9/site-packages/yandex_geocoder/client.py", line 48, in coordinates
data = self._request(address)["GeoObjectCollection"]["featureMember"]
File "/home/virtwww/w_jesuppv-rf_9d8d3c3c/django-env/lib/python3.9/site-packages/yandex_geocoder/client.py", line 40, in _request
raise InvalidKey()
yandex_geocoder.exceptions.InvalidKey

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/publish.yml
  • actions/checkout v4
  • actions/setup-python v5
.github/workflows/test.yml
  • actions/checkout v4
  • actions/setup-python v5
  • actions/cache v4
  • actions/cache v4
  • actions/checkout v4
  • actions/setup-python v5
  • actions/cache v4
  • actions/cache v4
pep621
pyproject.toml
poetry
pyproject.toml
  • python ^3.9
  • requests ^2.28.1
  • flake8 ^7.0.0
  • flake8-debugger ^4.1.2
  • flake8-isort ^6.0.0
  • flake8-print ^5.0.0
  • flake8-pytest-style ^2.0.0
  • flake8-quotes ^3.3.2
  • isort ^5.11.4
  • mypy ^1.0.0
  • pytest ^8.0.0
  • pytest-deadfixtures ^2.2.1
  • flake8-black ^0.3.6
  • black ^24.0.0
  • pytest-cov ^5.0.0
  • coveralls ^3.3.1
  • requests-mock ^1.10.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.