Skip to main content

Random-data generator to simulate fictional port data flows for use at a Hackathon

Project description

Mooring Data Generator

A simple script to generate fake mooring data for use in a hackathon. This script will send data payloads to and endpoint to simulate the data which might exist.

These will be http POST queries to the url provided as an argument at run time.

The script will run forever until the user sends a Ctrl+C command to end the script.

Usage

With UV (recommended)

If you don't have UV on your system, read the install instructions for UV

uvx mooring-data-generator http://127.0.0.1:8000/my/endpoint/

[!IMPORTANT] replace http://127.0.0.1:8000/my/endpoint/ with the appropriate url for your system

Vanilla python (If you don't want UV)

Install the package

pip install -U mooring-data-generator

Running the package

mooring-data-generator http://127.0.0.1:8000/my/endpoint/

[!IMPORTANT] replace http://127.0.0.1:8000/my/endpoint/ with the appropriate url for your system

Testing data is being sent

There's a helper application included in this package to allow you to check that the data is being sent.

mooring-data-receiver will display to the console all http traffic it receives.

mooring-data-receiver

By default it will run listening to any traffic 0.0.0.0 on port 8000

You can adjust this if needed by using a commend like

mooring-data-receiver --host 127.0.0.1 --port 5000

Troubleshooting

Command not found

If you are having trouble with the command not being found, you can attempt to run it as a module calling python

python -m mooring-data-generator http://127.0.0.1:8000/my/endpoint/

Pip not found

If pip can't be found on your system.

First, make sure you have Python installed.

python --version

you can call pip from python directly as a module.

python -m pip install -U mooring-data-generator

Release a new version

Be sure the tests pass

uv run ruff format
uv run ruff check
uv run tox

bump version and tag new release

uv version --bump minor
git commit -am "Release version v$(uv version --short)"
git tag -a "v$(uv version --short)" -m "v$(uv version --short)"

push to github

git push
git push --tags

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

mooring_data_generator-0.9.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

mooring_data_generator-0.9.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file mooring_data_generator-0.9.0.tar.gz.

File metadata

File hashes

Hashes for mooring_data_generator-0.9.0.tar.gz
Algorithm Hash digest
SHA256 7115c4d519d659d70c5fbd47773d6f051959f3a6ab154f679e4a6dd309154683
MD5 9453fcf7bfd86cecff1094464abcb588
BLAKE2b-256 f038073c2c8fd1281c1268ec022935d8aec90e18b57f962e86ea0a118a905e6d

See more details on using hashes here.

File details

Details for the file mooring_data_generator-0.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mooring_data_generator-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c36436906758483f1b503f1d8de54c9274d5d4323e4a45d1f92a68481415b508
MD5 359b657bcb07c4e3fb8acbcaf739cd63
BLAKE2b-256 4ab5f306a05423870903426a8012e151a306b43bbaf5de57722790c8c658862f

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