ukpyn Documentation
ukpyn is the Python client for the UK Power Networks Open Data Portal (ODP).
This documentation is designed for beginners first; you are new to working with API's follow the guided path below and work through the examples step by step.
What ukpyn helps you do
- Discover datasets available in UK Power Network's ODP
- Fetch records using simple Python functions
- Filter results, for example by licence area or time
- Build reproducible analysis in notebooks
- Scale up from simple calls to larger workflows
Before you begin
You will need:
- Python 3.11 or later
- A virtual environment such as conda or venv
- A UK Power Networks ODP API key
- Basic familiarity with running commands in your terminal
If any of the above is new to you, use the fully worked setup in Getting Started.
Start here
- New to Python APIs? Start with Getting Started
- New to the terminology? Read the Glossary
- Go to Tutorials
- Looking for domain-by-domain API patterns? Read Orchestrators
- Need a more inclusive reading and navigation experience? See Accessibility
Beginner learning path (recommended)
- Complete Getting Started until you can run one successful API call and print row counts.
- Open 01-getting-started.ipynb and run each cell in order.
- Continue with 02-fetching-data.ipynb to learn filterings and exporting.
- Use Orchestrators as a menu of domain-specific entry points.
Documentation map
- Getting Started: installation, API key setup, first API call, troubleshooting
- Glossary: beginner-friendly definitions of common API and energy-data terms
- Accessibility: accessibility principles, keyboard tips, and reporting guidance
- Tutorials: notebook-by-notebook guide and outcomes
- Orchestrators: guidance on which module to use for which data domain
Links
- Project: github.com/UKPN-DSO/ukpyn
- PyPI: pypi.org/project/ukpyn
- ODP: ukpowernetworks.opendatasoft.com
Important information
For package issues or documentation problems, raise an issue in the repo
Data licensing and reuse terms may vary by dataset. Check the relevant dataset page in the Open Data Portal for the applicable licence and usage terms.
Some portal resources may require registration, sign-in, or an API key.