liveparkingnorwich


Nameliveparkingnorwich JSON
Version 0.0.1 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-02-18 16:11:08
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 liveparkingnorwich
```

## Usage

```python

import liveparkingnorwich

# Create new Usage object
usage = liveparkingnorwich.Usage()

# 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": "liveparkingnorwich",
    "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/38/aa/306ad78bfea476ced765d89ea03e5cf84a2d38fef75cebb92fa2b5454ca3/liveparkingnorwich-0.0.1.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 liveparkingnorwich\n```\n\n## Usage\n\n```python\n\nimport liveparkingnorwich\n\n# Create new Usage object\nusage = liveparkingnorwich.Usage()\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.1",
    "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": "e0b052e78f6736fa2178f77521c4d74684f025ea46205745928eded924e0b0ed",
                "md5": "8b2655e3461c52a1b7ef0f5f39d1fe14",
                "sha256": "339945ea4e47811a21062be66d62408d85afca39f9ec5ce5b8600229e526e1ae"
            },
            "downloads": -1,
            "filename": "liveparkingnorwich-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8b2655e3461c52a1b7ef0f5f39d1fe14",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6943,
            "upload_time": "2024-02-18T16:11:07",
            "upload_time_iso_8601": "2024-02-18T16:11:07.096443Z",
            "url": "https://files.pythonhosted.org/packages/e0/b0/52e78f6736fa2178f77521c4d74684f025ea46205745928eded924e0b0ed/liveparkingnorwich-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "38aa306ad78bfea476ced765d89ea03e5cf84a2d38fef75cebb92fa2b5454ca3",
                "md5": "d14806019540eec625b4dbd2fcdafeae",
                "sha256": "33ebb2b338ee33bc736a26ea2c4c95de6fbc4d64da4f127b06b4bf33aa67d48e"
            },
            "downloads": -1,
            "filename": "liveparkingnorwich-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d14806019540eec625b4dbd2fcdafeae",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6711,
            "upload_time": "2024-02-18T16:11:08",
            "upload_time_iso_8601": "2024-02-18T16:11:08.799992Z",
            "url": "https://files.pythonhosted.org/packages/38/aa/306ad78bfea476ced765d89ea03e5cf84a2d38fef75cebb92fa2b5454ca3/liveparkingnorwich-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-18 16:11:08",
    "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": "liveparkingnorwich"
}
        
Elapsed time: 0.19112s