{"id":13859198,"url":"https://github.com/andfanilo/streamlit-light-leaflet","last_synced_at":"2025-03-19T05:30:55.756Z","repository":{"id":99876684,"uuid":"287791434","full_name":"andfanilo/streamlit-light-leaflet","owner":"andfanilo","description":"Streamlit quick \u0026 dirty Leaflet component that sends back coordinates on map click","archived":false,"fork":false,"pushed_at":"2020-08-15T17:16:19.000Z","size":2613,"stargazers_count":45,"open_issues_count":0,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-28T16:08:19.766Z","etag":null,"topics":["leaflet","prototype","python","streamlit"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andfanilo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-15T17:14:15.000Z","updated_at":"2024-11-02T15:36:41.000Z","dependencies_parsed_at":"2023-05-10T21:15:10.773Z","dependency_job_id":null,"html_url":"https://github.com/andfanilo/streamlit-light-leaflet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andfanilo%2Fstreamlit-light-leaflet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andfanilo%2Fstreamlit-light-leaflet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andfanilo%2Fstreamlit-light-leaflet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andfanilo%2Fstreamlit-light-leaflet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andfanilo","download_url":"https://codeload.github.com/andfanilo/streamlit-light-leaflet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243971180,"owners_count":20376784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["leaflet","prototype","python","streamlit"],"created_at":"2024-08-05T03:02:36.625Z","updated_at":"2025-03-19T05:30:55.749Z","avatar_url":"https://github.com/andfanilo.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Streamlit component - return coordinates on map click\n\nA very quick \u0026 dirty prototype of Streamlit component that sends back coordinates on click, using the Reactless template. Feel free to fork and go on your Leaflet adventure!\n\n![Quickstart Success](demo.gif)\n\n## Quickstart\n\n- Ensure you have [Python 3.6+](https://www.python.org/downloads/), [Node.js](https://nodejs.org), and [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) installed.\n- Clone this repo.\n- Create a new Python virtual environment for the template:\n\n```\n$ cd template\n$ python3 -m venv venv  # create venv\n$ . venv/bin/activate   # activate venv\n$ pip install streamlit # install streamlit\n```\n\n- Initialize and run the component template frontend:\n\n```\n$ cd template/my_component/frontend\n$ npm install    # Install npm dependencies\n$ npm run start  # Start the Webpack dev server\n```\n\n- From a separate terminal, run the template's Streamlit app:\n\n```\n$ cd template\n$ . venv/bin/activate  # activate the venv you created earlier\n$ streamlit run my_component/__init__.py  # run the example\n```\n\n- Modify the frontend code at `my_component/frontend/src/MyComponent.tsx`.\n  - **Especially use your own Mapbox token ;)**\n  - Height of div is also hardcoded, should be in separate css.\n- Modify the Python code at `my_component/__init__.py`.\n\n## What if I want to do it myself ?\n\n```shell\ngit clone https://github.com/streamlit/component-template\ncp -r component-template/template-reactless/ ~/streamlit-light-leaflet/\ncd ~/streamlit-light-leaflet/my_component/frontend\nnpm add leaflet @types/leaflet\n```\n\nThen follow the Quickstart.\n\n## More Information\n\n- [Streamlit Components documentation](https://docs.streamlit.io/en/stable/streamlit_components.html)\n- [Streamlit Forums](https://discuss.streamlit.io/tag/custom-components)\n- [Streamlit Components gallery](https://www.streamlit.io/components)\n- [Original issue](https://github.com/randyzwitch/streamlit-folium/issues/6)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandfanilo%2Fstreamlit-light-leaflet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandfanilo%2Fstreamlit-light-leaflet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandfanilo%2Fstreamlit-light-leaflet/lists"}