Skip to main content

Light-weight minimal API Fuzzer in Python

Project description

  _     _ _             _             
(_)   (_|_)           (_)            
 _     _ _  ___   ____ _ ____  _____ 
| |   | | |/ _ \ / ___) |  _ \(____ |
 \ \ / /| | |_| | |   | | | | / ___ |
  \___/ |_|\___/|_|   |_|_| |_\_____|
                                     
Light-weight minimal API Fuzzer in Python

Viorina is a minimalist, lightweight API-fuzzing tool.
Describe your payload once—Viorina generates compliant, random test data for you.

It stays tiny

  • Declarative schemas – Register any model with @Viorina.payload (FastAPI-style, zero boiler-plate).
  • Descriptor magic – Python’s descriptor protocol auto-wires parent/child fields, so you don’t have to.
  • Accurate text fuzzing – Uses the Rust crate regex-generate to create strings that match your exact pattern.

Examples

Use @app.payload to register

  • Describe your payload structure and call Viorina.build_dict() at the end
import viorina            # For `app = viorina.Viorina()`
from viorina import Auto  # For describing schema


app = viorina.Viorina()


# Use `app.payload` to register
@app.payload
class Root:           # ... its child node `BranchA` not defined yet ...
    BranchA = Auto()  # => {"Root": { "BranchA": { ... } } }
    Name = "Anji"     # => {"Root": { "Name": "Anji", "BranchA": { ... } } }
    

@app.payload
class BranchA:        # ... the node `BranchA` defined later ...
    Age = 233         # => { "BranchA": { "Age": 233 } }
    

p = app.build_dict()  # ... build payload

# 
# {'Root': 
#     {'Name': 'Anji', 
#      'BranchA': {'Age': 233}
#     }
# }

Use descriptors to generate random data for fuzz testing

  • Use Text, Integer, Auto descriptors to generate random mock values
from viorina import Text, Integer, Auto, Viorina


app = Viorina()


@app.payload
class Root:
    SomeNode = Auto()
    RandomValue = Integer(min_value=233, max_value=235)


@app.payload
class SomeNode:
    RandomName = Text(regex=r'[AEIOU][aeiou][rnmlv][aeiou]{2}')
    ChildNode = Auto()
    RandomValue = Integer(min_value=0, max_value=9)


@app.payload
class ChildNode:
    ConstValue: int = 233


if __name__ == "__main__":
    import pprint
    
    for _ in range(3):
        pprint.pp(app.build_dict())
        
# Output:
        
# {'Root': {'RandomValue': 235,
#           'SomeNode': {'RandomName': 'Eolee',
#                        'RandomValue': 5,
#                        'ChildNode': {'ConstValue': 233}}}}
# {'Root': {'RandomValue': 235,
#           'SomeNode': {'RandomName': 'Aarei',
#                        'RandomValue': 7,
#                        'ChildNode': {'ConstValue': 233}}}}
# {'Root': {'RandomValue': 234,
#           'SomeNode': {'RandomName': 'Uovai',
#                        'RandomValue': 1,
#                        'ChildNode': {'ConstValue': 233}}}}

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

viorina-2025.7.8.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

viorina-2025.7.8-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file viorina-2025.7.8.tar.gz.

File metadata

  • Download URL: viorina-2025.7.8.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for viorina-2025.7.8.tar.gz
Algorithm Hash digest
SHA256 230ff6ba4e5c1c95c3ce64174f0a17ec2db9a9164272e6c763bbec5bd334e596
MD5 bb05e6350efae06d7dc683b4be7143e7
BLAKE2b-256 3d2fcf2978f11dacca69c7fa30f2c0ab4a84a9f2a893d20c35485e5e0d4cc5a3

See more details on using hashes here.

File details

Details for the file viorina-2025.7.8-py3-none-any.whl.

File metadata

  • Download URL: viorina-2025.7.8-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for viorina-2025.7.8-py3-none-any.whl
Algorithm Hash digest
SHA256 287032ec512e0823a937165c435b709a8df41984c3b47cce5df70c4f84fe2e01
MD5 a10326c08a8be2bd9315ed326de238de
BLAKE2b-256 470993fbfb33d12987e43baa5007b4d1ec4fe58ad2ad6daaaec2de56b1c2eea6

See more details on using hashes here.

Supported by

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