Skip to main content

jk_vcard

Introduction

This python module parses (and produces) vCard data as provided in vcf files.

Information about this module can be found here:

How to use this module

Import this module

Please include this module into your application using the following code:

import jk_vcard

Parse a .vcf file

If you export your contacts in your Android smart phone, a VCF file is created. This can serve as an example file and can be parsed using the following code:

with open("contacts.vcf", "r") as f:
	data = f.read()

for vCard in VCFParser.parseText(data):
	print("-" * 120)
	print()
	vCard.dump()
	print()

print("-" * 120)

Produce a .vcf file from vCard data

If you want to produce a .vcf file you simply can invoke VCFEncoder.toLines(...) in order to generate text lines in this format:

vCard = ....

for textLine in VCFEncoder.toLines(vCard):
	print(textLine)

If you have a list of VCard objects you can simple (re)create a .vcf file like this:

with open("contacts.vcf", "w") as f:
	for vCard in myVCardList:
		for textLine in VCFEncoder.toLines(vCard):
			f.write(textLine + "\n")

Contact Information

This work is Open Source. This enables you to use this work for free.

Please have in mind this also enables you to contribute. We, the subspecies of software developers, can create great things. But the more collaborate, the more fantastic these things can become. Therefore Feel free to contact the author(s) listed below, either for giving feedback, providing comments, hints, indicate possible collaborations, ideas, improvements. Or maybe for "only" reporting some bugs:

License

This software is provided under the following license:

  • Apache Software License 2.0

Metadata

Release files for jk-vcard 0.2020.9.21.1

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

Source distribution (sdist)

Source distribution for jk-vcard 0.2020.9.21.1
File Size Uploaded
jk_vcard-0.2020.9.21.1.tar.gz 9.2 kB Details

Release files / jk_vcard-0.2020.9.21.1.tar.gz

Download URL jk_vcard-0.2020.9.21.1.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fec191362669ca5767d4bdc20718b567da13f8ff2f23d45d8f816d55f90e2877
BLAKE2b-256 checksum
How to use checksums
d01e9ef20886ceea4d2201d6fbb579dc402f82014bd20cdcfae0faf2c25ef31b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.2

Release history Release notifications | RSS feed

This release

0.2020.9.21.1 This release

1 release file

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