This package provides real-time information about available parking spaces in car parks and park & ride sites around Norwich.
Project description
Live car parking spaces in Norwich, UK
This package provides real-time information about available parking spaces in car parks and park & ride sites around Norwich. The data is sourced from an XML feed which is maintained by Norfolk County Council and refreshed every 5 minutes.
Installation
python3 -m venv venv
source venv/bin/activate
pip3 install live_parking_norwich
Usage
from live_parking_norwich import LiveParkingNorwich
# Create new Usage object
usage = LiveParkingNorwich()
# Returns a list of CarPark objects
car_parks = usage.refresh()
# Check for success
if usage.success:
print(f"Last updated: {usage.last_updated}")
# Iterate through each CarPark object
for car_park in car_parks:
print("---")
print(f"{car_park.code} | {car_park.name}")
print(f"{car_park.occupancy}% full | {car_park.status}")
print(f"{car_park.occupied_spaces} used")
print(f"{car_park.remaining_spaces} remaining")
print(f"{car_park.total_capacity} in total")
else:
print(usage.error_message)
print(usage.traceback)
Last updated: 2024-02-18 15:37:24
---
CPN0017 | Chantry Place, Chapelfield Road,
53.0% full | enoughSpacesAvailable
520 used
455 remaining
975 in total
---
CPN0016 | ThickThorn, Norwich Road, Norwich
4.0% full | enoughSpacesAvailable
33 used
693 remaining
726 in total
---
CPN0015 | Harford, Ipswich Road, Norwich
0.0% full | carParkClosed
0 used
798 remaining
798 in total
...
...
...
CarPark attributes
| Attribute | Type |
|---|---|
| code | String |
| name | String |
| occupancy | String |
| status | String |
| occupied_spaces | Integer |
| remaining_spaces | Integer |
| total_capacity | Integer |
CarPark.status values
| Status | Description |
|---|---|
| carParkClosed | The specified car park is closed. |
| allCarParksFull | All car parks are full within a specified area. |
| carParkFacilityFaulty | The specified car parking facility is not operating normally. |
| carParkFull | A specified car park is completely occupied. |
| carParkStatusUnknown | The status of the specified car park(s) is unknown. |
| enoughSpacesAvailable | Specified car parks have car-parking spaces available. |
| multiStoryCarParksFull | Multi level car parks are fully occupied. |
| noMoreParkingSpacesAvailable | Specified car parks are fully occupied. |
| noParkAndRideInformation | No park and ride information will be available until the specified time. |
| noParkingAllowed | No parking allowed until the specified time. |
| noParkingInformationAvailable | Car parking information is not available until a specified time. |
| normalParkingRestrictionsLifted | The parking restrictions that normally apply in the specified location have been temporarily lifted. |
| onlyAFewSpacesAvailable | Specified car parks have 95% or greater occupancy. |
| parkAndRideServiceNotOperating | Park and ride services are not operating until the specified time. |
| parkAndRideServiceOperating | Park and ride services are operating until the specified time. |
| specialParkingRestrictionsInForce | Parking restrictions, other than those that normally apply, are in force in a specified area. |
Licence
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file live_parking_norwich-0.0.2.tar.gz.
File metadata
- Download URL: live_parking_norwich-0.0.2.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0021ba432d99f630563b677a38f8d59e91d9b77e64a77aa7930cfc59d9a6b619
|
|
| MD5 |
45f0e451e9b42ab1f2072c88f7a05931
|
|
| BLAKE2b-256 |
2602d5261899864787b334b029efb57883174bbafcdeb84f31eb8d139d8fdec2
|
File details
Details for the file live_parking_norwich-0.0.2-py3-none-any.whl.
File metadata
- Download URL: live_parking_norwich-0.0.2-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e01a0c511632b3529352e17fb4a98329b6f24b7d991eb28b5d332df04d274b3
|
|
| MD5 |
603d402c3ee32879cc7f3db1dc2fa94d
|
|
| BLAKE2b-256 |
f3f778e8a1bc95331afe23b5b7c2427fd4b45cd97c3951fe28c6b1534fc2185d
|