Skip to content

altansayan/mock-jutsu-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

323 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🥷 Mock Jutsu

Stop mocking with random strings. Start generating cryptographically valid test data.

Tests Python Data Types Locales Zero Dependencies License: MIT PyPI Docker Hub JMeter Plugin Postman

DISCLAIMER — FOR TESTING PURPOSES ONLY All data generated by this library is algorithmically synthesized and entirely fictitious. Designed exclusively for software testing, QA automation, and load testing. Generated values (identity numbers, IBANs, card numbers, passport numbers, etc.) must never be used for fraud, identity theft, financial crime, or any other illegal activity. The authors accept no liability for misuse. By using this software you agree to these terms.

Traditional Mockers give you a random 16-digit string and call it a credit card number.
Mock Jutsu runs Luhn. Every. Single. Time.

InstallationWhy Mock Jutsu?Usage Guide390 Types


🚀 The Ultimate Algorithmic Mock Data Engine

QA engineers, Data Scientists, and Fintech developers are tired of test data failing at the validation layer. Mock Jutsu is built differently. It treats every identifier as a strict technical specification. If an algorithm defines a checksum, Mock Jutsu computes it. No shortcuts.

🔥 Features That Will Blow Your Mind

  • Zero External Dependencies: The core data engine uses pure Python standard library for maximum speed, security, and zero bloat.
  • 5955 Automated Tests: We don't guess. We verify. Every single format and locale is rigorously tested against real-world algorithmic specifications.
  • Multi-Interface: Use it as a rich Python SDK, a blazing-fast CLI, or a FastAPI REST endpoint.
  • Export Anywhere: Directly export structured records as JSON, CSV, or SQL INSERT statements with thousands of rows in milliseconds.
  • Context-Aware Profiles: Generate a person, and their email, phone, national ID, and IBAN will inherently match their locale and name.

🤔 Why Mock Jutsu?

Capability Mock Jutsu 🥷 Traditional Mockers 🤡
Card Numbers (Luhn Valid) ✅ 9 Networks Validated ❌ Random digits
IBANs (MOD-97 Valid) ✅ Country-specific ❌ Format-only
National IDs ✅ Real algorithms (6 countries) ⚠️ Partial / Random
Telecom (IMEI, ICCID, IMSI) ✅ 3GPP / ITU-T Valid ❌ None
Securities (ISIN, LEI, SEDOL) ✅ Checksum Validated ❌ None
Crypto (BTC, ETH addresses) ✅ Base58Check / Keccak-256 ❌ None
Payment QRs (EMVCo/SEPA) ✅ CRC-16 Checksum / BCD Format ❌ None
Barcodes (EAN, ISBN, GS1) ✅ GS1 v24.0 Valid ❌ None
Tracking (USPS/UPS/FedEx) ✅ Pub.97 Luhn / Mod-11 ❌ None
Banking Routing Codes ✅ Valid ABA/Sort/BIC ⚠️ Format-only
RFID & NFC Data ✅ EPC SGTIN-96, NDEF URI/Text ❌ None
Context-Aware Profiles ✅ Linked Name ↔ Email ↔ Phone ⚠️ Disconnected randoms
SQL/CSV Direct Export ✅ Native Support ❌ Manual generation
Schema/Template Generation jutsu.template() for complex dictionaries ❌ Manual object mapping
Built-in CLI Tool ✅ Out-of-the-box (mockjutsu generate) ❌ Requires custom scripts
Built-in REST API ✅ 1 command (mockjutsu start-api) ❌ Requires custom wrapper
Reverse Regex Generation ✅ Pattern → valid string (stdlib only) ❌ None
External Dependencies Zero (Pure Python) ❌ Relies on external files
Regulation-Aware Masking ✅ PCI DSS · GDPR · KVKK · HIPAA · GLBA · UK GDPR · LGPD · PDPA · PIPL · PSD2 · BSA · FATF ❌ None

🎬 See It In Action

Mock Jutsu Demo


⚙️ Installation

Python Package

Requires Python 3.9+.

# Standard Installation
pip install mockjutsu

# Isolated CLI Installation (recommended for macOS/Linux)
pipx install mockjutsu

# For Developers (Editable Mode)
git clone https://github.com/altansayan/mock-jutsu-api.git
cd mock-jutsu-api
pip install -e .

REST API — Docker (Recommended)

Run the full REST API locally with a single command. No Python required.

Docker Hub

# Pull and run (port 8000)
docker run -p 8000:8000 altansezerayan/mock-jutsu:latest

# With custom worker count
docker run -p 8000:8000 -e GRANIAN_WORKERS=8 altansezerayan/mock-jutsu:latest

# Run in background
docker run -d -p 8000:8000 --name mock-jutsu altansezerayan/mock-jutsu:latest

Once running:

🌐 REST API — Built-in CLI (Local, Optional)

If you have the Python package installed, you can also spin up the API directly via CLI — no Docker needed.

$ mockjutsu start-api --port 8000
GET http://localhost:8000/generate/cardnum?network=visa
GET http://localhost:8000/profile?locale=DE&count=3

# Interactive Swagger UI automatically available at http://localhost:8000/docs

🔧 JMeter Plugin

Use Mock Jutsu types directly inside JMeter test plans as native custom functions — no scripting, no CSV, no subprocess required.

JMeter Plugin

${__mockjutsu_identity(tckn|TR)}                  → 46396909916
${__mockjutsu_financial(iban|DE)}                 → DE89370400440532013000
${__mockjutsu_financial(cardnum:visa|TR|mask)}    → 4155 56** **** 3399
${__mockjutsu_contact(email|US)}                  → john.doe@example.com

mock-jutsu-jmeter on GitHub · Download JAR v1.0.0

📬 Postman Collection

390 ready-to-run requests organized by category. Import and hit Send.

Postman

# Collection is bundled in this repo — import directly in Postman:
# .postman/collections/mock-jutsu.postman_collection.json

View Collection


💻 Usage

Whether you are writing automated tests, working in the terminal, or spinning up a mock API, Mock Jutsu is ready.

🐍 1. Python SDK

from mockjutsu.core import jutsu

# 1. Complete, internally-consistent profiles
person = jutsu.profile(locale='DE')
print(person['nationalid']) # -> "86094599602" (Steuer-ID: ISO 7064 MOD 11,10 ✅)
print(person['iban'])       # -> "DE89370400440532013000" (ISO 13616 MOD-97 ✅)

# 2. Individual precise data types
card = jutsu.generate('cardnum', network='amex') # -> "376956063521007" (Luhn ✅)
btc = jutsu.generate('btc_address')              # -> "1BvBMSEYstWet..." (Base58Check SHA256d ✅)

# 3. 🎯 Fully Customizable Templates
# Define your own schema and generate a list of dictionaries instantly
users = jutsu.template(
    {'user_id': 'uuid', 'name': 'fullname', 'wallet': 'crypto_address'},
    count=100, locale='UK'
)

# 4. Generate thousands of records & export directly to SQL
sql = jutsu.export(
    {'id': 'uuid', 'name': 'fullname', 'card': 'cardnum', 'bank_account': 'iban'},
    count=5000, format='sql', table='users', locale='TR'
)

⚡ 2. Beautiful CLI

Generate valid test data straight from your terminal.

# Get single values instantly
$ mockjutsu generate tckn
$ mockjutsu generate iban --locale FR
$ mockjutsu generate cardnum --network troy

# Need an array of valid US phone numbers?
$ mockjutsu bulk phone --count 500 --locale US

# Generate CSV datasets and save to a file
$ mockjutsu template uuid fullname crypto_address --count 100 --format csv > users.csv

# Generate SQL seed files and save to a text file
$ mockjutsu template uuid fullname crypto_address --count 500 --format sql --table USERS > data.txt

🧱 4. Template Generation via CLI

Combine multiple data types into a structured JSON record directly from your terminal.

$ mockjutsu template uuid fullname crypto_address --count 2 --locale US
[
  {
    "uuid": "5ae780dd-1e26-4317-bc87-495eb53563aa",
    "fullname": "Holly Brandt",
    "crypto_address": "13gSozPBVaQMfFvVrRB7AQ3Fe6ZLDXErUh"
  },
  {
    "uuid": "76706c3e-3eaa-4afd-a749-e4002764d275",
    "fullname": "Brooke Lyons",
    "crypto_address": "1GPuQvEVjYfy7C4fdxtY2Y1q76Awngsk9n"
  }
]

🌍 6 Locales. 100% Real Algorithms.

We don't just localize names; we localize mathematics.

Locale Country National ID Internal Algorithm Executed
🇹🇷 TR TCKN Dual MOD-10 checksum, 11 digits
🇺🇸 US SSN / EIN ABA Routing MOD-10
🇬🇧 UK NIN / UTR HMRC prefix restrictions
🇩🇪 DE Steuer-ID ISO 7064 MOD 11,10
🇫🇷 FR SIREN / TVA Luhn + MOD-97
🇷🇺 RU INN / SNILS Weighted checksum arrays, MOD-101

📦 390 Supported Data Types

We cover everything from standard identities to complex financial market identifiers.

👤 Identity & Demographic (42 types)
tckn ssn ein nin siren siret tva inn snils ogrn passport license +20 more
💳 Financial & Banking (53 types)
cardnum cardnetwork iban sepa_qr emv_qr_p2p emv_qr_atm emv_qr_pos bic sort_code +18 more
📡 Telecom & IoT (19 types)
imei iccid imsi msisdn rfid_uid epc nfc_uid ndef_uri apdu ir_nec +10 more
💹 Securities & Crypto (38 types)
isin cusip sedol lei btc_address eth_address tx_hash block_hash
📦 E-Commerce & Barcodes (20 types)
ean13 upca isbn13 gs1_128 tracking_number sku order_id +5 more

(See our interactive guides for the full list of 390 types: 🇹🇷 TR | 🇺🇸 EN | 🇬🇧 UK | 🇩🇪 DE | 🇫🇷 FR | 🇷🇺 RU)


🤝 Contributing

Mock Jutsu thrives on community contributions. Found a checksum we're not validating? A locale we're missing? We'd love your help!

🚨 Strict TDD & Performance Mandate To maintain our enterprise-grade quality, this repository mechanically enforces Test-Driven Development (TDD).

  • Every new generator must be fully tested mathematically.
  • Every new generator must pass the < 1.5ms performance baseline.
  • GitHub Actions will automatically block any Pull Request that lacks passing tests.

Please read our full CONTRIBUTING.md guide before starting your work.

Quick Start for Contributors

  1. Fork the Project & clone it locally.
  2. Install the pre-push safety hook: python scripts/setup-hooks.py
  3. Write your test first, then implement your algorithm.
  4. Commit your changes and open a Pull Request!

⚖️ Legal Disclaimer

Generated data is entirely synthetic and for development/testing environments only.

  • Do not submit to real financial, government, or telecom production systems.
  • Generated IBANs, card numbers, and national IDs are mathematically valid but do not belong to real entities.


💖 Support Mock Jutsu

Mock Jutsu is free and open-source. If it saved you hours of debugging, consider buying me a coffee ☕


"Every cup of coffee = one more data type." 🥷


NetworkAddress
Ξ Ethereum (ETH)0x8D2fF0a795E3a19D41758Cb9b4451C39D528BbAF

This section will be updated with our sponsors.


If mock-jutsu saved you from debugging a "valid-looking but broken" test ID, please leave a ⭐!

Released under the MIT License • Copyright © 2026 Altan Sezer Ayan — A.S.A

About

The Ultimate Algorithmic Mock Data Engine. Stop mocking with random strings — generate cryptographically valid test data. 390 types · 6 locales · Zero dependencies · CLI + REST API + JMeter Plugin

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors