Skip to main content

Simple API wrapper for US National Park Services

Project description

PyPI version fury.io PyPI pyversions

A simple API wrapper for US National Park Services.

Getting an API key

You must have an API key with the National Park Services to use this library. Register for your free API key here.

API documentation

Thorough National Park Service API documentation can be found here.

Installation

pip install python-natlparks

API examples

Let’s get started by instantiating a NatlParks object with your API key.

from natlparks import NatlParks
parks = NatlParks(your_api_key)

Now, you can browse various API endpoints.

Activities: Activities are the primary categories of activities in which to participate in national parks.

parks.activities()  # default parameters: limit=50, start=1, q="", id=""
parks.activities(limit=10, start=1, q="historical")

Activities parks: Returns activities parks information.

parks.activities.parks()  # default parameters: limit=50, start=1, q="", id=""
parks.activities.parks(limit=10, start=1, q="historical")

Alerts: Alerts communicate information about hazardous, potentially hazardous, or changing conditions that may affect a visit to a national park. Alert data includes the type of alert, title, description, and optional link to additional information.

parks.alerts()  # default parameters: limit=50, start=1, q="", parkCode="", stateCode=""
parks.alerts(limit=10, start=1)

Amenities: Returns amenities information.

parks.amenities()  # default parameters: limit=50, start=1, q="", id=""
parks.amenities(limit=10, start=1)

Amenities parks places: TBD.

parks.amenities.parksplaces()  # default parameters: limit=50, start=1, q="", id="", parkCode=""
parks.amenities.parksplaces(limit=10, start=1)

Amenities parks visitor centers: Returns amenities parks visitor centers information.

parks.amenities.parksvisitorcenters()  # default parameters: limit=50, start=1, q="", id="", parkCode=""
parks.amenities.parksvisitorcenters(limit=10, start=1)

Articles: Articles are shared content assets that are tagged so they can appear in a variety of places on NPS.gov. Data includes a title, image, short description of the content, and link to more information about the asset.

parks.articles()  # default parameters: limit=50, start=1, q="", parkCode="", stateCode=""
parks.articles(limit=10, start=1)

Campgrounds: Campground data includes location, contact, operating hours, site amenities, fee, and accessibility information for campgrounds in national parks At least one representative photo of each campground is available Some parks have multiple campgrounds of a variety of types (eg, developed or primitive); others have none.

parks.campgrounds()  # default parameters: limit=50, start=1, q="", parkCode="", stateCode=""
parks.campgrounds(limit=10, start=1)

Events: Event data includes information about the date, time, fee, and description of events taking place in national parks.

parks.events()  # default parameters: limit=50, start=1, pageSize=10, pageNumber=1, expandRecurring=False, q="", id="", parkCode="", dateStart="", dateEnd=""
parks.events(limit=10, start=1)

Lesson plans: Lesson plans are standards-based resources about national parks for teacher to use in their classrooms. Lesson plan data includes objectives, grade level, subject, duration, and standards information.

parks.lesson_plans()  # default parameters: limit=50, start=1, q="", parkCode="", stateCode=""
parks.lesson_plans(limit=10, start=1)

News releases: News release data includes a title, abstract, and link to national park news releases, as well as an optional image.

parks.news_releases()  # default parameters: limit=50, start=1, q="", parkCode="", stateCode=""
parks.news_releases(limit=10, start=1)

Parks: Park basics data includes location, contact, operating hours, and entrance fee/pass information for each national park At least five photos of each park are also available.

parks.parks()  # default parameters: limit=50, start=1, q="", parkCode="", stateCode=""
parks.parks(limit=10, start=1)

People: People are shared content assets that are tagged so they can appear in a variety of places on NPS.gov. Data includes a title, image, short description of the content, and link to more information about the asset.

parks.people()  # default parameters: limit=50, start=1, q="", parkCode="", stateCode=""
parks.people(limit=10, start=1)

Places: Places are shared content assets that are tagged so they can appear in a variety of places on NPS.gov. Data includes a title, image, short description of the content, and link to more information about the asset.

parks.places()  # default parameters: limit=50, start=1, q="", id=""
parks.places(limit=10, start=1)

Topics: Topics are the primary categories of topics interpreted by national parks.

parks.topics()  # default parameters: limit=50, start=1, q="", id=""
parks.topics(limit=10, start=1)

Topics parks: Returns topics parks information.

parks.topics.parks()  # default parameters: limit=50, start=1, q="", id=""
parks.topics.parks(limit=10, start=1)

Visitor centers: Visitor center data includes location, contact, and operating hours information for visitor centers and other visitor contact facilities in national parks At least one visitor center is listed for each park; some parks with multiple visitor centers may include information about more than one.

parks.visitor_centers()  # default parameters: limit=50, start=1, q="", parkCode="", stateCode=""
parks.visitor_centers(limit=10, start=1)

Contribute

Support

If you are having issues or would like to propose a new feature, please use the issues tracker.

License

The project is licensed under the MIT license.

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

python-natlparks-0.1.5.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

python_natlparks-0.1.5-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file python-natlparks-0.1.5.tar.gz.

File metadata

  • Download URL: python-natlparks-0.1.5.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.12

File hashes

Hashes for python-natlparks-0.1.5.tar.gz
Algorithm Hash digest
SHA256 79aa53ca5714e4f1868ff9713ca9b9dc7afdfdc22545accf61862d045861064b
MD5 13c15edf6096302b25f49ce3ddb134a3
BLAKE2b-256 1fb697b078a1cc3d807089936dc99eb4b4d36ced87c9315ff6bcb429efa58681

See more details on using hashes here.

File details

Details for the file python_natlparks-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for python_natlparks-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cae9158eb47b9ae7cefa8a7d844c4d105c0646092c4a4f8fa31e0bb1f0ef3e1c
MD5 8f2ab6222ce3cad34d3b45c866c2e986
BLAKE2b-256 ff0b04fde96641c071a8d849bfe2211d972c8d70f7cda2c2875bffd6706abb30

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