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
)
- English (
- 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.
- Supports random pseudonym generation when no seed is provided.
Installation
From PyPI
pip install pseudomatic
From Source
-
Clone the repository:
git clone <repository-url> cd pseudomatic
-
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: "Хоробрий Лис"
# Generate a random pseudonym (no seed provided)
random_pseudonym = pseudonym(language="en")
print(random_pseudonym) # Example: "Curious Elephant"
# Generate a random pseudonym in Ukrainian
random_pseudonym_ua = pseudonym(language="ua")
print(random_pseudonym_ua) # Example: "Цікавий Слон"
# Use different themes
business_pseudonym = pseudonym("JohnDoe", language="en", theme="business")
retail_pseudonym = pseudonym("JohnDoe", language="ua", theme="retail")
From Command Line
Run the script directly:
python -m pseudomatic
This will generate example pseudonyms in English and Ukrainian using the 'retail' 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:
- Update the version number in
pyproject.toml
. - Create a new release on GitHub with a tag matching the version (e.g.,
v0.1.0
). - 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:
- Create an API token on PyPI (https://pypi.org/manage/account/token/).
- 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
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
File details
Details for the file pseudomatic-0.1.3.tar.gz
.
File metadata
- Download URL: pseudomatic-0.1.3.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
b2bd3e69bb42cb15032e45af626c40f11c60facf94dbc8033eb6384af14940a7
|
|
MD5 |
f856accc050a290ec061c7b4267b70d0
|
|
BLAKE2b-256 |
ca2bb23a23d1722c0e0ba181494d35681a31002a46c69665871c827cf53b3837
|
Provenance
The following attestation bundles were made for pseudomatic-0.1.3.tar.gz
:
Publisher:
publish.yml
on OpenMindUA/pseudomatic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
pseudomatic-0.1.3.tar.gz
-
Subject digest:
b2bd3e69bb42cb15032e45af626c40f11c60facf94dbc8033eb6384af14940a7
- Sigstore transparency entry: 199197702
- Sigstore integration time:
-
Permalink:
OpenMindUA/pseudomatic@11aad658430f4716eb2c0adedadc55592929ff38
-
Branch / Tag:
refs/tags/0.1.3
- Owner: https://github.com/OpenMindUA
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
publish.yml@11aad658430f4716eb2c0adedadc55592929ff38
-
Trigger Event:
release
-
Statement type:
File details
Details for the file pseudomatic-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: pseudomatic-0.1.3-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
3f1fbe5680c78301ba08ea6d3ece5bd47d9447c20fa23ca80a150972900097b3
|
|
MD5 |
20b2c58d0a9ff7276a7c4b3d7b0fef5d
|
|
BLAKE2b-256 |
66a318715643dc860837d0aac7530c6a65598ba33d7255bbcfda06ecc8d3e8d5
|
Provenance
The following attestation bundles were made for pseudomatic-0.1.3-py3-none-any.whl
:
Publisher:
publish.yml
on OpenMindUA/pseudomatic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
pseudomatic-0.1.3-py3-none-any.whl
-
Subject digest:
3f1fbe5680c78301ba08ea6d3ece5bd47d9447c20fa23ca80a150972900097b3
- Sigstore transparency entry: 199197704
- Sigstore integration time:
-
Permalink:
OpenMindUA/pseudomatic@11aad658430f4716eb2c0adedadc55592929ff38
-
Branch / Tag:
refs/tags/0.1.3
- Owner: https://github.com/OpenMindUA
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
publish.yml@11aad658430f4716eb2c0adedadc55592929ff38
-
Trigger Event:
release
-
Statement type: