https://github.com/robintw/offline_folium
Allows using folium without an internet connection
https://github.com/robintw/offline_folium
folium folium-python leaflet offline
Last synced: 6 months ago
JSON representation
Allows using folium without an internet connection
- Host: GitHub
- URL: https://github.com/robintw/offline_folium
- Owner: robintw
- License: epl-2.0
- Created: 2022-03-01T09:04:15.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-08T20:35:32.000Z (10 months ago)
- Last Synced: 2025-04-06T08:38:01.659Z (6 months ago)
- Topics: folium, folium-python, leaflet, offline
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 16
- Watchers: 5
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Offline Folium
`offline_folium` is a Python module that makes it possible to use [folium](https://python-visualization.github.io/folium/) without an internet connection.## Quickstart
- Install offline_folium (`pip install offline_folium`)
- When you have an internet connection, download the relevant Javascript/CSS by running `python -m offline_folium`
- When you do not have an internet connection, run `from offline_folium import offline` _before_ you import folium, and then use folium normally. For example:```
from offline_folium import offline
import foliumm = folium.Map()
```## Why?
By default, folium loads the required Javascript and CSS from CDNs over the internet. This doesn't work when you need to run folium offline. This project helps with that by allowing you to download the required resources when you have an internet connection (or during the application build/deploy process) and then use folium later on with those downloaded resources. The aim is to package it all up so that it is nice and simple for end-users (who may not be folium or Python specialists) to use.