live-parking-norwich


Namelive-parking-norwich JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/exactful/live-parking-norwich
SummaryThis package provides real-time information about available parking spaces in car parks and park & ride sites around Norwich.
upload_time2024-03-07 21:09:49
maintainer
docs_urlNone
authorDaniel Cooper
requires_python
license
keywords parking parking-spaces park-and-ride norwich
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://www.data.gov.uk/dataset/b6e83001-fb1e-43e8-9ef1-a522b226160a/norfolk-county-council-live-car-park-data) which is maintained by [Norfolk County Council](https://www.data.gov.uk/dataset/b6e83001-fb1e-43e8-9ef1-a522b226160a/norfolk-county-council-live-car-park-data) and refreshed every 5 minutes.

![Car park](https://raw.githubusercontent.com/exactful/live-parking-norwich/main/carpark.png)

## Installation

```bash
python3 -m venv venv
source venv/bin/activate
pip3 install live_parking_norwich
```

## Usage

```python

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)

```

```text

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](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/exactful/live-parking-norwich",
    "name": "live-parking-norwich",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "parking parking-spaces park-and-ride Norwich",
    "author": "Daniel Cooper",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/26/02/d5261899864787b334b029efb57883174bbafcdeb84f31eb8d139d8fdec2/live_parking_norwich-0.0.2.tar.gz",
    "platform": null,
    "description": "# Live car parking spaces in Norwich, UK\n\nThis 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](https://www.data.gov.uk/dataset/b6e83001-fb1e-43e8-9ef1-a522b226160a/norfolk-county-council-live-car-park-data) which is maintained by [Norfolk County Council](https://www.data.gov.uk/dataset/b6e83001-fb1e-43e8-9ef1-a522b226160a/norfolk-county-council-live-car-park-data) and refreshed every 5 minutes.\n\n![Car park](https://raw.githubusercontent.com/exactful/live-parking-norwich/main/carpark.png)\n\n## Installation\n\n```bash\npython3 -m venv venv\nsource venv/bin/activate\npip3 install live_parking_norwich\n```\n\n## Usage\n\n```python\n\nfrom live_parking_norwich import LiveParkingNorwich\n\n# Create new Usage object\nusage = LiveParkingNorwich()\n\n# Returns a list of CarPark objects\ncar_parks = usage.refresh()\n\n# Check for success\nif usage.success:\n\n    print(f\"Last updated: {usage.last_updated}\")\n\n    # Iterate through each CarPark object\n    for car_park in car_parks:\n\n        print(\"---\")\n        print(f\"{car_park.code} | {car_park.name}\")\n        print(f\"{car_park.occupancy}% full | {car_park.status}\")\n        print(f\"{car_park.occupied_spaces} used\")\n        print(f\"{car_park.remaining_spaces} remaining\")\n        print(f\"{car_park.total_capacity} in total\")\n\nelse:\n    print(usage.error_message)\n    print(usage.traceback)\n\n```\n\n```text\n\nLast updated: 2024-02-18 15:37:24\n---\nCPN0017 | Chantry Place, Chapelfield Road,\n53.0% full | enoughSpacesAvailable\n520 used\n455 remaining\n975 in total\n---\nCPN0016 | ThickThorn, Norwich Road, Norwich\n4.0% full | enoughSpacesAvailable\n33 used\n693 remaining\n726 in total\n---\nCPN0015 | Harford, Ipswich Road, Norwich\n0.0% full | carParkClosed\n0 used\n798 remaining\n798 in total\n...\n...\n...\n\n```\n\n## CarPark attributes\n\n| Attribute | Type |\n|-----------|------|\n| code | String |\n| name | String |\n| occupancy | String |\n| status | String |\n| occupied_spaces | Integer |\n| remaining_spaces | Integer |\n| total_capacity | Integer |\n\n## CarPark.status values\n\n| Status | Description |\n|-------|-------------|\n| carParkClosed | The specified car park is closed. |\n| allCarParksFull | All car parks are full within a specified area. |\n| carParkFacilityFaulty | The specified car parking facility is not operating normally. |\n| carParkFull | A specified car park is completely occupied.                                    |\n| carParkStatusUnknown | The status of the specified car park(s) is unknown. |\n| enoughSpacesAvailable | Specified car parks have car-parking spaces available. |\n| multiStoryCarParksFull | Multi level car parks are fully occupied. |\n| noMoreParkingSpacesAvailable | Specified car parks are fully occupied. |\n| noParkAndRideInformation | No park and ride information will be available until the specified time. |\n| noParkingAllowed | No parking allowed until the specified time. |\n| noParkingInformationAvailable | Car parking information is not available until a specified time. |\n| normalParkingRestrictionsLifted | The parking restrictions that normally apply in the specified location have been temporarily lifted. |\n| onlyAFewSpacesAvailable | Specified car parks have 95% or greater occupancy. |\n| parkAndRideServiceNotOperating | Park and ride services are not operating until the specified time. |\n| parkAndRideServiceOperating | Park and ride services are operating until the specified time. |\n| specialParkingRestrictionsInForce | Parking restrictions, other than those that normally apply, are in force in a specified area. |\n\n## Licence\n\n[Open Government Licence](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/)\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "This package provides real-time information about available parking spaces in car parks and park & ride sites around Norwich.",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://github.com/exactful/live-parking-norwich"
    },
    "split_keywords": [
        "parking",
        "parking-spaces",
        "park-and-ride",
        "norwich"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f3f778e8a1bc95331afe23b5b7c2427fd4b45cd97c3951fe28c6b1534fc2185d",
                "md5": "603d402c3ee32879cc7f3db1dc2fa94d",
                "sha256": "0e01a0c511632b3529352e17fb4a98329b6f24b7d991eb28b5d332df04d274b3"
            },
            "downloads": -1,
            "filename": "live_parking_norwich-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "603d402c3ee32879cc7f3db1dc2fa94d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 8137,
            "upload_time": "2024-03-07T21:09:47",
            "upload_time_iso_8601": "2024-03-07T21:09:47.943932Z",
            "url": "https://files.pythonhosted.org/packages/f3/f7/78e8a1bc95331afe23b5b7c2427fd4b45cd97c3951fe28c6b1534fc2185d/live_parking_norwich-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2602d5261899864787b334b029efb57883174bbafcdeb84f31eb8d139d8fdec2",
                "md5": "45f0e451e9b42ab1f2072c88f7a05931",
                "sha256": "0021ba432d99f630563b677a38f8d59e91d9b77e64a77aa7930cfc59d9a6b619"
            },
            "downloads": -1,
            "filename": "live_parking_norwich-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "45f0e451e9b42ab1f2072c88f7a05931",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7383,
            "upload_time": "2024-03-07T21:09:49",
            "upload_time_iso_8601": "2024-03-07T21:09:49.539118Z",
            "url": "https://files.pythonhosted.org/packages/26/02/d5261899864787b334b029efb57883174bbafcdeb84f31eb8d139d8fdec2/live_parking_norwich-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-07 21:09:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "exactful",
    "github_project": "live-parking-norwich",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "live-parking-norwich"
}
        
Elapsed time: 0.45468s