Skip to main content

Basic hCalendar Parser

Dependencies

  • isodate [http://pypi.python.org/pypi/isodate/]
  • Beautiful Soup 4 [http://www.crummy.com/software/BeautifulSoup/]

Installation

Install the latest version from pypi.python.org:

pip install python-hcalendar

Install the development version by cloning the source from github.com:

pip install git+https://github.com/mback2k/python-hcalendar.git

Basic Example

The hCalendar class accepts file-like objects and strings, basically anything supported by BeautifulSoup

from hcalendar import hCalendar

html = """<div class="vcalendar"><div class="vevent">
 <a class="url" href="http://conferences.oreillynet.com/pub/w/40/program.html">
  http://conferences.oreillynet.com/pub/w/40/program.html
 </a>
 <span class="summary">Web 2.0 Conference</span>:
 <abbr class="dtstart" title="2005-10-05">October 5</abbr>-
 <abbr class="dtend" title="2005-10-07">7</abbr>,
 at the <span class="location">Argent Hotel, San Francisco, CA</span>
</div></div>"""

hcal = hCalendar(html)
for cal in hcal:
    for event in cal:
        print event.url
        print event.summary
        print event.dtstart
        print event.dtend
        print event.location

HTML source code taken from microformats.org. Output will look like this:

http://conferences.oreillynet.com/pub/w/40/program.html
Web 2.0 Conference
2005-10-05 00:00:00
2005-10-07 00:00:00
Argent Hotel, San Francisco, CA

TODO

  • Implement support for hCard contacts and attendees
  • Implement support for geo locations
  • Maybe support for other microformats?

License

Metadata

Release files for python-hcalendar 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-hcalendar 0.2.4
File Size Uploaded Provenance Actions
python-hcalendar-0.2.4.tar.gz 5.4 kB Without provenance Details for python-hcalendar-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-hcalendar 0.2.4
File Interpreter ABI Platform Actions
python_hcalendar-0.2.4-py3-none-any.whl Python 3 none any Details for python_hcalendar-0.2.4-py3-none-any.whl

Total release size: 12.3 kB

Release files / python-hcalendar-0.2.4.tar.gz

Download URL python-hcalendar-0.2.4.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
036d2842538de5828ff900eb85cb7e618643ca5d91d0d53ea5a443ebbebde24c
BLAKE2b-256 checksum
How to use checksums
04d45567e3cc4d046af9f9a9981b90996a873db25e4cc8d574ffe410b0e947ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.1

Release files / python_hcalendar-0.2.4-py3-none-any.whl

Download URL python_hcalendar-0.2.4-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
041cad8d832db88a47f69bc4d261bf75a8cdcae849457456a2b800d43dc80aa5
BLAKE2b-256 checksum
How to use checksums
7f392180c7f6db48612b0df0e7ba4d5875e2c0c7e388509a2a4ec9769b065536
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.1

Security for python-hcalendar 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page