Skip to main content

A tool for generating deterministic pseudonyms based on a seed string and selected language

Project description

Pseudomatic

Pseudomatic is a Python-based tool for generating pseudonyms based on a seed string and a selected language. It is useful for anonymizing data or creating unique, repeatable pseudonyms.

Features

  • Supports multiple languages:
    • English (en)
    • Ukrainian (ua)
  • Generates pseudonyms in the format: Adjective Noun (e.g., "Brave Fox" or "Хоробрий Лис").
  • Deterministic output: the same seed and language will always produce the same pseudonym.

Installation

From PyPI

pip install pseudomatic

From Source

  1. Clone the repository:

    git clone <repository-url>
    cd pseudomatic
    
  2. Install in development mode:

    pip install -e .
    

Usage

As a Python Package

from pseudomatic import pseudonym

# Generate a pseudonym in English
pseudonym_en = pseudonym("JohnDoe", language="en")
print(pseudonym_en)  # Example: "Brave Fox"

# Generate a pseudonym in Ukrainian
pseudonym_ua = pseudonym("JohnDoe", language="ua")
print(pseudonym_ua)  # Example: "Хоробрий Лис"

# Use different themes
business_pseudonym = pseudonym("JohnDoe", language="en", theme="business")
market_pseudonym = pseudonym("JohnDoe", language="ua", theme="market")

From Command Line

Run the script directly:

python -m pseudomatic

This will generate example pseudonyms in English and Ukrainian using the 'market' theme.

Project Structure

  • pseudomatic.py: Main script for generating pseudonyms.
  • names.py: Contains adjective and noun lists for supported languages.
  • pyproject.toml: Package configuration for building and distribution.
  • README.md: Project documentation.

Development and Deployment

Continuous Integration/Continuous Deployment

This project uses GitHub Actions for CI/CD:

  • When a new release is created on GitHub, the package is automatically built and published to PyPI.
  • The workflow is defined in .github/workflows/publish.yml.

Creating a New Release

To create a new release:

  1. Update the version number in pyproject.toml.
  2. Create a new release on GitHub with a tag matching the version (e.g., v0.1.0).
  3. The GitHub Actions workflow will automatically build and publish the package to PyPI.

PyPI Authentication

The GitHub Actions workflow requires a PyPI API token stored as a GitHub secret named PYPI_API_TOKEN. To set this up:

  1. Create an API token on PyPI (https://pypi.org/manage/account/token/).
  2. Add the token as a secret in your GitHub repository settings.

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

pseudomatic-0.1.2.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

pseudomatic-0.1.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file pseudomatic-0.1.2.tar.gz.

File metadata

  • Download URL: pseudomatic-0.1.2.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pseudomatic-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5cfc7a081c143fb76dea11170ccf58d6821c1905059a423178e057b74bcf5005
MD5 1306dce7f7fa99a8eb01f2cfc8f4bad5
BLAKE2b-256 2d8ec542aeccc8bd56ca20a6db8f5777218e58ecffcb5988184fced82e483e37

See more details on using hashes here.

File details

Details for the file pseudomatic-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pseudomatic-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pseudomatic-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 76951910e101204402edc2dda059bc8a76b8fd9d66ef048632c6020dbdb50b10
MD5 786ad008bfe5fc017b1deb01f76cc7e4
BLAKE2b-256 01b8f51c120be084526d462a336b8a6f76fef19777310c92878516352a024652

See more details on using hashes here.

Supported by

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