Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
|Build Status| |Coverage Status|
Google Maps API client. For full API documentation go to:
http://python-gmaps.readthedocs.org
There are a bunch of libraries for Google Maps Web Service. To name a
few: * googlemaps <https://pypi.python.org/pypi/googlemaps/>
__ *
google.directions <https://pypi.python.org/pypi/google.directions>
__
What's wrong with them? googlemaps uses deprecated google API and forces you to format your parameters instead of using native python datatypes. And what about google.directions? Just take a look inside it's code...
So here is code for new Google Maps API endpoints. It requires
requests <https://github.com/kennethreitz/requests>
__, supports native
python datatypes and is sweetened with some syntactic sugar. Nothing
more. No bells and whistles.
Any contributions (code/issues) are welcome.
::
pip install python-gmaps
Just import API endpoint of your choice and start querying:
.. code:: python
from gmaps import Geocoding
api = Geocoding()
api.geocode("somwhere")
api.reverse(51.123, 21.123)
If you need to use Google Maps API for Business then instantiate your
endpoint with api_key
param
.. code:: python
from gmaps import Geocoding
api = Geocoding(api_key='your_secret_api_key')
Each endpoint method raises adequate exception when status of query is
different than OK
. It also unpacks results list from Google API
output dict so you have one key less to access but it does nothing more.
So if Google geocoding api outputs something like:
::
{
results: [
...
],
status: 'OK'
}
You will get only get list that was inside result
value. At least
one element returned is always assured, otherwise
gmnaps.errors.NoResults
exception is raised.
For each API endpoint you can specify: * default sensor
value *
protocol (http/https) * api key (only for http)
Available endpoints: * Geocoding()
* Directions()
*
Timezone()
* Elevation()
For detailed documentation of each endpoint refer to dosctrings or this API documentation <http://python-gmaps.readthedocs.org/en/latest/>
.
If you need list of available values for some parameters (like geocoding
components, languages, regions etc.) refer to Google Maps API docs <https://developers.google.com/maps/documentation/webservices/>
.
These values can change anytime so there is no reason to check for them
in this lib - they will be checked anyway.
0.3.1 (2016-03-23)
- updated list of trove classifiers
- nicer ``long_description`` on PyPI
- simplified requirements in ``setup.py`` script
0.3.0 (2015-08-31)
result_type
and
location_type
) thanks to @20tabgmaps.polyline.encode()
utility function to encode paths
using Encoded Polyline Algorithm Format <https://developers.google.com/maps/documentation/utilities/polylinealgorithm?hl=en>
__Elevation
endpoint added implemented0.2.1 (2014-11-11)
- ``gmaps.errors.GmapException`` inherits from ``Exception`` instead of
``BaseException``
0.2.0 (2014-10-02)
0.1.1 (2014-05-16)
- python 3.3 support
0.1.0 (2014-05-09)
Timezone
endpoint added0.0.2 (2013-10-03)
- ``Directions`` endpoint added
0.0.1 (2013-10-02)
Geocoding
endpoint.. |Build Status| image:: https://travis-ci.org/swistakm/python-gmaps.svg?branch=master :target: https://travis-ci.org/swistakm/python-gmaps .. |Coverage Status| image:: https://img.shields.io/coveralls/swistakm/python-gmaps.svg :target: https://coveralls.io/r/swistakm/python-gmaps
FAQs
Google Maps API client
We found that python-gmaps demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.