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.0.tar.gz (2.8 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.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pycontactfile-0.3.0.tar.gz
  • Upload date:
  • Size: 2.8 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.0.tar.gz
Algorithm Hash digest
SHA256 a478100a9760749c6453c76ee5a816fba96344923cb767f0b4fcb3296ddbe2eb
MD5 dcf4e6d0f16955b83a38d2125b550ada
BLAKE2b-256 c98832f7d081f9589c53d06bce6638346a53bc247508a62a45019cf2245b3b9c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pycontactfile-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30ac52fce425cf86affea1ad30dd25e2a18f438f4cbf0dcf3d0393b6108b54fe
MD5 43f34004b1530cb0c4f64e63001db883
BLAKE2b-256 cec389144b783ec81c5b2bdf0e420824157a155023a7755272ba183bd31aa08e

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