Skip to main content

ug

Utils using Google API

To install: pip install ug

You'll also need to get a Google API key and enable the maps services for it.

When you call a function, in the gmaps_client, you can specify the key itself or can specify the environment variable (prefixed with "$") where you stored it, or even a fully instantiated client you made yourself. If you don't specify anything, it will use "$GOOGLE_API_KEY" as the default (so will look for an API key in the GOOGLE_API_KEY environment variable).

Examples

Google maps

>>> r = search_maps("meditation", "Aix-en-Provence", radius_in_meters=3000)
>>> len(r)
10
>>> [x['formatted_address'] for x in r]  # doctest: +SKIP
['90A Rue Jean Dausset, 13090 Aix-en-Provence, France',
'24 Rue Thiers, 13100 Aix-en-Provence, France',
...
'700 Chem. de Banon, 13100 Aix-en-Provence, France',
'31 Cr Gambetta 13100, 13090 Aix-en-Provence, France']
>>> r[0]  # doctest: +SKIP
'business_status': 'OPERATIONAL',
'formatted_address': '90A Rue Jean Dausset, 13090 Aix-en-Provence, France',
'geometry': {'location': {'lat': 43.53714249999999, 'lng': 5.4149873},
'viewport': {'northeast': {'lat': 43.53849157989272,
    'lng': 5.416325329892722},
'southwest': {'lat': 43.53579192010728, 'lng': 5.413625670107278}}},
'icon': 'https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/school-71.png',
'icon_background_color': '#7B9EB0',
'icon_mask_base_uri': 'https://maps.gstatic.com/mapfiles/place_api/icons/v2/school_pinlet',
'name': 'Pleine conscience aix',
'opening_hours': {'open_now': True},
'photos': [{'height': 1067,
'html_attributions': ['<a href="https://maps.google.com/maps/contrib/114127511381087003840">A Google User</a>'],
'photo_reference': 'AdCG2DNSD6nzorLbQagoMyC_ATRfKWAtXYzDknmBYspoXGnJzeqxScNA3VIhF4wPKkAuI3W4KBOEvibZenNuO0qRVbNYkBFUahJSRPXJjtHFQj4nBur4auszmIwykM8QoMxcrHucGcwcYbj3GZnat1r6nDJXWAKrWLDEqbf9P4mVDoFIr7Vg',
'width': 1600}],
'place_id': 'ChIJbc-zeTeNyRIRrtgswndfJ34',
'plus_code': {'compound_code': 'GCP7+VX Aix-en-Provence',
'global_code': '8FM7GCP7+VX'},
'rating': 5,
'reference': 'ChIJbc-zeTeNyRIRrtgswndfJ34',
'types': ['school', 'health', 'point_of_interest', 'establishment'],
'user_ratings_total': 3}

Metadata

Release files for ug 0.0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ug 0.0.12
File Size Uploaded Provenance Actions
ug-0.0.12.tar.gz 12.0 kB Without provenance Details for ug-0.0.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ug 0.0.12
File Interpreter ABI Platform Actions
ug-0.0.12-py3-none-any.whl Python 3 none any Details for ug-0.0.12-py3-none-any.whl

Total release size: 24.8 kB

Release files / ug-0.0.12.tar.gz

Download URL ug-0.0.12.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f1b9a3d328537e0730864534321bd13e93fe7afc4b5e52692a1bc9eac462500c
BLAKE2b-256 checksum
How to use checksums
4799ddd65e3a289163704209e303e61f470c64cd47d7621019b58f4154af2ffe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ug-0.0.12-py3-none-any.whl

Download URL ug-0.0.12-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3395a13962f0fd310e6cefb0b4deb67a62ccd3299f4096b6f95195c0e22cd1ad
BLAKE2b-256 checksum
How to use checksums
0c7be5cc61982ae321143a1f0a93c1bdc3f2ad0c117bf07ffaf50d7fb1af1d04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for ug 0.0.12

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page