Skip to main content

python client to Surfline API

Project description

pysurfline

SurfReport plot

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 PyPI PyPI - Python Version Downloads
Builds macOSUbuntuWindows
Tests codecov
Documentation Documentation build

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 with days and intervalHours.

    Go to full example.

    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.

    Go to full example.

    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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysurfline-0.2.0.1.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

pysurfline-0.2.0.1-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file pysurfline-0.2.0.1.tar.gz.

File metadata

  • Download URL: pysurfline-0.2.0.1.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for pysurfline-0.2.0.1.tar.gz
Algorithm Hash digest
SHA256 00837c0e4aea27eec28dbc523cde35597fbf8a7c653f07f0fc09745edef2d0bb
MD5 cb643f76bd94af2c4f5e366574485f90
BLAKE2b-256 1e7e99be37b76cb224cf4b946562898651778626eb310878c19be16adfacf8f7

See more details on using hashes here.

File details

Details for the file pysurfline-0.2.0.1-py3-none-any.whl.

File metadata

  • Download URL: pysurfline-0.2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for pysurfline-0.2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 291300bf5ecc871b85051df0dcc714fd0d20d8a8040f7d13f0c3893bf898f257
MD5 0cd62d7d620af2b708cc6f97fefa22b2
BLAKE2b-256 b096e6e88c90f69aaa5f5294ceff82e122d49fdd6a1d27eb86998a3b85b8cfe5

See more details on using hashes here.

Supported by

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