python Surfline API
Project description
pysurfline
Get the surf forecast for any spot listed on Surfline.
Quickly get the forecast data as a pandas Dataframe and plot surf forecast with matplotlib to visualize the conditions of your favorite surf spot.
- Surf (surf min, surf max)
- Wind (speed, direction)
- Swell (height, period, direction)
- Tide (height, direction)
- sunlightTimes (sunrise, sunset)
Distribution | |
Builds | |
Tests | |
Documentation |
Installation
Install with pip
pip install pysurfline
Example
-
Get the surf forecasts for a given
SpotId
and get data as a pandas Dataframe. Control forecast timespan withdays
andintervalHours
.import pysurfline spotId = "5842041f4e65fad6a7708cfd" spotforecasts = pysurfline.get_spot_forecasts( spotId, days=2, intervalHours=3, ) df = spotforecasts.get_dataframe()
-
Visualize the surf report for a given
SpotId
.import pysurfline spotId = "5842041f4e65fad6a7708cfd" spotforecasts = pysurfline.get_spot_forecasts(spotId) pysurfline.plot_surf_report( spotforecasts, barLabels=True, )
Documentation
The documentation can be found here.
Disclaimer
This package is not official and not affiliated with Surfline in any way.
API responses may change at any time and the developement of this package may not be able to keep up with those changes.
If you find any issues, please open an issue or submit a pull request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pysurfline-0.2.1.tar.gz
.
File metadata
- Download URL: pysurfline-0.2.1.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1ed023986b8aa7d3f8f084f7d0466c170002286da5f9bdc3bca2817c210026e |
|
MD5 | b656ca94479ef959ec2c38e5e702de18 |
|
BLAKE2b-256 | c6ed24aa711972752e85862a7d7afee3cf2181e2091c35a9fd21f39217c3995e |
File details
Details for the file pysurfline-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: pysurfline-0.2.1-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f40bb7d560d09638399206c7845a1d95479bc4120a738f4290d30436283f45c |
|
MD5 | 99391bbfe62f497f1b3e3fba2056e2c3 |
|
BLAKE2b-256 | b9ffccb829eaabd3265fede8236e8a33d4d1d30cf14a804a94461ed4cb7aee29 |