Skip to main content

PyContactFile: A simple Python library for processing VCF formats

Supports vCard, hCard, and jCard parsing.

Motivation

Primarily implemented to support the asaperson library.

Limitations

This library was internally based on the pythonvCard4 library. During later testing, it was revealed that the library has some limitations vs. the example(s) given in the specification, including:

  • Parsing adr and anniversary fields that are not ISO dates
  • Parsing tel and email types that are surrounded by quotation marks
  • Parsing geo values that are geo URIs
  • Consistently handling and displaying addresses

Currently, this library inherits all these limitations for vCards, and the latter for all inputs.

Prerequisites

  • Python 3.11 runtime
  • Pip for package installation

Installation

Install the dependencies into the environment with pip:

pip install -r requirements.txt
pip install .

Usage

Call the relevant *card_to_contact to convery a string representing a VCF into a Contact object. See the pythonvCard4 library for details on the output format.

Testing

python3 -m coverage run -m unittest discover -s test -p "*_test.py" && python -m coverage report --skip-covered
python -m coverage html

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Ryan Quinn - Initial work

License

MIT.

Metadata

Release files for PyContactFile 0.3.2

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

Source distribution (sdist)

Source distribution for PyContactFile 0.3.2
File Size Uploaded
pycontactfile-0.3.2.tar.gz 8.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PyContactFile 0.3.2
File Interpreter ABI Platform
pycontactfile-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 17.7 kB

Release files / pycontactfile-0.3.2.tar.gz

Download URL pycontactfile-0.3.2.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8ae1ac47ee087451c66c7770b45926b97f5599c5517b568a1282e25cc9451ba2
BLAKE2b-256 checksum
How to use checksums
4353da22cc806950a67af34fbafd92d911e2ad14c02c4b1cbc6b0c1383454cbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / pycontactfile-0.3.2-py3-none-any.whl

Download URL pycontactfile-0.3.2-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab65f21ab85d3863a1921f42e5cb7a492ffd9a116eaf2fbfc1b0b0aa36f23457
BLAKE2b-256 checksum
How to use checksums
e876033182f22fd079c09ce1f580f7a9529732d16affb3cd75affc10577dae52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

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