Python wrapper embedding the C_OpeningHours writing on my own, implementation of the opening hours standard as described here: https://wiki.openstreetmap.org/wiki/Key:opening_hours
Project description
## OpeningHours (python)
This module is a parser between the excellent [OpenStreetMap Opening Hour format](https://wiki.openstreetmap.org/wiki/Key:opening_hours) and python datetime objects.
### Installation
```
pip install opening_hours
```
### Usage
```
from opening_hours import OpeningHours
from datetime import datetime
import pytz
oh = OpeningHours("2016 Mar: Mo-Sa 08:00-13:00,14:00-17:00")
oh.is_open(datetime.now(pytz.timezone('Europe/Paris')))
```
This module is a parser between the excellent [OpenStreetMap Opening Hour format](https://wiki.openstreetmap.org/wiki/Key:opening_hours) and python datetime objects.
### Installation
```
pip install opening_hours
```
### Usage
```
from opening_hours import OpeningHours
from datetime import datetime
import pytz
oh = OpeningHours("2016 Mar: Mo-Sa 08:00-13:00,14:00-17:00")
oh.is_open(datetime.now(pytz.timezone('Europe/Paris')))
```
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
opening_hours-0.1.1.tar.gz
(1.5 kB
view details)
File details
Details for the file opening_hours-0.1.1.tar.gz
.
File metadata
- Download URL: opening_hours-0.1.1.tar.gz
- Upload date:
- Size: 1.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0531a4686494ed9218d356583edb3c1632d3aa593d291bf4f653bdbcb396c42 |
|
MD5 | c9d8ea5683e93210ab5924a00b5ead25 |
|
BLAKE2b-256 | 25459a15b4c8b2901a78f72b071ad050bfc0d98adc9e0b1ecb9afc79f0750dc3 |