Skip to main content

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.

Car park

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

Open Government Licence

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

live_parking_norwich-0.0.2.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

live_parking_norwich-0.0.2-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

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

Hashes for live_parking_norwich-0.0.2.tar.gz
Algorithm Hash digest
SHA256 0021ba432d99f630563b677a38f8d59e91d9b77e64a77aa7930cfc59d9a6b619
MD5 45f0e451e9b42ab1f2072c88f7a05931
BLAKE2b-256 2602d5261899864787b334b029efb57883174bbafcdeb84f31eb8d139d8fdec2

See more details on using hashes here.

File details

Details for the file live_parking_norwich-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for live_parking_norwich-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0e01a0c511632b3529352e17fb4a98329b6f24b7d991eb28b5d332df04d274b3
MD5 603d402c3ee32879cc7f3db1dc2fa94d
BLAKE2b-256 f3f778e8a1bc95331afe23b5b7c2427fd4b45cd97c3951fe28c6b1534fc2185d

See more details on using hashes here.

Supported by

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