Skip to main content

A custom Streamlit component to get the users location via js navigator.geolocation.

Project description

streamlit-geolocation

A geolocation button for streamlit

This uses the javascript method navigator.geolocation.getCurrentPosition to get the user's location. The response is a GeolocationCoordinates object.

This is heavily inspired by this repository: https://github.com/aghasemi/streamlit_js_eval I am simplifying the scope to just getting the user's location and not evaluating arbitrary javascript, but I owe a lot to the original author.

https://github.com/Steffanic/streamlit-geolocation/assets/38746732/b654b254-618d-453f-b605-8e3381feb8c3

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

streamlit_geolocation-0.0.7.tar.gz (795.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_geolocation-0.0.7-py3-none-any.whl (802.5 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_geolocation-0.0.7.tar.gz.

File metadata

  • Download URL: streamlit_geolocation-0.0.7.tar.gz
  • Upload date:
  • Size: 795.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.31.0 rfc3986/1.5.0 tqdm/4.66.1 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for streamlit_geolocation-0.0.7.tar.gz
Algorithm Hash digest
SHA256 dc3d5bb9cd6c02fd48cf4a4206b4651581d65726ee74305ae70d371b33b01651
MD5 5a17f8b79377c9e42ee6861b54ff4505
BLAKE2b-256 c8d2021fcc67aed5c9f105d176804281a9eb757d82291e0b5eb1eb4a52d8461c

See more details on using hashes here.

File details

Details for the file streamlit_geolocation-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: streamlit_geolocation-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 802.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.31.0 rfc3986/1.5.0 tqdm/4.66.1 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for streamlit_geolocation-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 d2ccc9d654d9a58fac746c4b0b4e8453e59433c1e6c349c40f246013dda97010
MD5 3f833b7e11e183937b15d2299a83575a
BLAKE2b-256 fae794591fc22433572b98c499de28cf2a9365b3ea13fc839ee3f47e50c7bb22

See more details on using hashes here.

Supported by

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