Skip to main content

A simple Python library for processing VCF formats

Project description

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.

Project details


Download files

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

Source Distribution

pycontactfile-0.3.2.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycontactfile-0.3.2-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file pycontactfile-0.3.2.tar.gz.

File metadata

  • Download URL: pycontactfile-0.3.2.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for pycontactfile-0.3.2.tar.gz
Algorithm Hash digest
SHA256 8ae1ac47ee087451c66c7770b45926b97f5599c5517b568a1282e25cc9451ba2
MD5 9a96ab0c416d5cb7c54070b2f89d1cbd
BLAKE2b-256 4353da22cc806950a67af34fbafd92d911e2ad14c02c4b1cbc6b0c1383454cbc

See more details on using hashes here.

File details

Details for the file pycontactfile-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: pycontactfile-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for pycontactfile-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ab65f21ab85d3863a1921f42e5cb7a492ffd9a116eaf2fbfc1b0b0aa36f23457
MD5 295caf4bce7438a26d7024423d8af8a4
BLAKE2b-256 e876033182f22fd079c09ce1f580f7a9529732d16affb3cd75affc10577dae52

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page