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
adrandanniversaryfields that are not ISO dates - Parsing
telandemailtypes that are surrounded by quotation marks - Parsing
geovalues 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycontactfile-0.3.1.tar.gz.
File metadata
- Download URL: pycontactfile-0.3.1.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
097f0c0b16177dc19579fa18b4e457c8b910be0a88b2024782dd4c1479b7b2ec
|
|
| MD5 |
a2e351fe2c7f686bba6056f5348faac7
|
|
| BLAKE2b-256 |
f75452f4c460f83afcd7a27c59f3b96876006d6df72f3de60abd784dff2132e0
|
File details
Details for the file pycontactfile-0.3.1-py3-none-any.whl.
File metadata
- Download URL: pycontactfile-0.3.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b5f2cf89df8f55b6b0ecf4240a1993a3f07abe29cd49ce445411b94616a2e03
|
|
| MD5 |
520d4a76ad9766349c66744e58fd72d8
|
|
| BLAKE2b-256 |
99cbe2f67e6d53294225d379e74864993e5c1f7cd323be721f08ca1570ed9ef5
|