Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

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')))

```

Project details


Release history Release notifications

This version
History Node

0.1.1

History Node

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
opening_hours-0.1.1.tar.gz (1.5 kB) Copy SHA256 hash SHA256 Source None Nov 28, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page