Skip to main content

TravelSpecificPIIPseudonymization

TravelSpecificPIIPseudonymization is a Python-based tool designed to detect and pseudonymize personally identifiable information (PII) in travel-related documents. It leverages custom recognizers and fake data generators for specific aviation industry entities such as Passenger Name Records (PNRs), e-tickets, flight numbers, airline and aircraft codes, and airport codes. The pseudonymization tool ensures the privacy and confidentiality of sensitive data commonly found in aviation documents, making it suitable for airline companies, travel agencies, and other organizations dealing with flight information.

Features

  • Pseudonymization of Travel-Related PII: Detects and pseudonymizes common entities in airline and aviation-related documents such as:

    • Passenger Name Records (PNRs)
    • E-tickets
    • Aircraft registration numbers
    • IATA/ICAO aircraft and airline codes
    • IATA/ICAO/FAA airport codes
    • Contact information (phone numbers, email addresses)
  • Custom Recognizers: Includes custom patterns to detect industry-specific codes such as flight numbers, e-ticket prefixes, and more.

  • Faker Integration: Replaces sensitive data with synthetic data using the Faker library, while also providing flexibility for adding custom fake data generators (e.g., generating fake PNRs, e-tickets).

  • Reversible Pseudonymization: The tool provides mapping between the original and pseudonymized data, allowing for reversible pseudonymization when required (useful for testing or regulatory purposes).

Components Overview:

  1. tspii.py: This file is the main entry point for the project. It handles document input, pseudonymization execution, and saving the pseudonymized document to a file. You can customize the (de)pseudonymization of your documents by using the ReversibleAnonymizer class.

  2. reversible_anonymizers: This directory contains the ReversibleAnonymizer core class, that can be used to perform reversible pseudonymization. This class provides methods to (de)anonymize documents, and offers options for customization.

  3. recognizers: Defines custom recognizers to detect specific PII entities in travel-related documents (e.g., PNR, e-tickets, IATA/ICAO codes).

  4. operators: Defines custom operators that will determine the new value of anonymized sentitive data. It implements custom fake data generators that create realistic synthetic data for aviation-related entities (e.g., generating fake PNRs or e-tickets).

  5. anonymizers: Defines a custom method that define the process to anonymize sensitive data.

  6. deanonymizers: Defines a custom method that define the process to deanonymize sensitive data.

  7. tests: Contains unit tests for the CustomPseudonymizer class, validating the accuracy of the pseudonymization process and ensuring that sensitive information is properly anonymized while maintaining a correct mapping for potential deanonymization.

Usage

To use the tool, follow these steps:

  pip install travel-pii-anonymisation

  travel_pii

Would you like to (1) Load a document from a file or (2) Use the sample document? Enter 1 or 2:
If you choose 1, you need to specify a file path. (you can use sample.txt in this repository)

Minimum Requirements:

Ensure you have at least 1 GB of free storage and a stable internet connection, as this software requires downloading the en-core-web package which is approximately 500 MB.

Contributing

Contributions to improve the tool are welcome! Feel free to open issues for bugs or feature requests, or submit pull requests for enhancements.

Acknowledgements

This project utilizes various libraries, including LangChain for document processing and Presidio for PII detection and anonymization.

Metadata

Release files for travel-pii-anonymisation 0.3.3

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

Source distribution (sdist)

Source distribution for travel-pii-anonymisation 0.3.3
File Size Uploaded Provenance Actions
travel_pii_anonymisation-0.3.3.tar.gz 10.3 kB Without provenance Details for travel_pii_anonymisation-0.3.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for travel-pii-anonymisation 0.3.3
File Interpreter ABI Platform Actions
travel_pii_anonymisation-0.3.3-py3-none-any.whl Python 3 none any Details for travel_pii_anonymisation-0.3.3-py3-none-any.whl

Total release size: 22.6 kB

Release files / travel_pii_anonymisation-0.3.3.tar.gz

Download URL travel_pii_anonymisation-0.3.3.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b40a93e33fab18dc2b9b8218bb838a159d2ee89a7d02b0e5fa0245e1fbea432c
BLAKE2b-256 checksum
How to use checksums
5f8d5c366d372bc3aeeb43a8b79e94c5c4156817c3cf9f7b699c7b8a97e2c531
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / travel_pii_anonymisation-0.3.3-py3-none-any.whl

Download URL travel_pii_anonymisation-0.3.3-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c86eede760ec2dd7c3e72b1c20b3ef8c6df0a23c8fd9d323d58808e3c8a50d93
BLAKE2b-256 checksum
How to use checksums
2d7ab9905ea40c1b16d12d9004a8404a7a66f5aaf96ec8d2eca7ed377b8c96ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for travel-pii-anonymisation 0.3.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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