Skip to main content

Simple API wrapper for US National Park Services

Project description

python-natlparks


pypiv Python 3.8+ continuous-integration Licence

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

This 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.6.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

python_natlparks-0.1.6-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file python_natlparks-0.1.6.tar.gz.

File metadata

  • Download URL: python_natlparks-0.1.6.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for python_natlparks-0.1.6.tar.gz
Algorithm Hash digest
SHA256 2eda144ac218b363fe09484c9ac895e10ee301ee853507d2ce8deb625cf90a91
MD5 1320b9ddbdebca4d5d20c44b81314e83
BLAKE2b-256 80d840f82505c50f643118e65cb4ba5a45df65c18bad065a325533f645c58e9f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_natlparks-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 bf08fa161d36b35ee012c1741807a9e53a3ac733c85d2909a0c1c54312618f82
MD5 649bf6fce775ae0f1c192524e0a659e4
BLAKE2b-256 6870f81d439358f2192f1035b66d520cb32b72525a4e2313263fbb97fc394fcb

See more details on using hashes here.

Supported by

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