This project has been archived by its maintainers, and is no longer receiving any updates.
PostgreSQL Sales Generator
PostgreSQL Sales Generator
Table of Contents
Prerequisites
- Python 3.14 and above
- This module runs on psycopg
Install
- with brew
brew install rioriost/tap/pg-salesgen
Usage
[pg-salesgen --help](usage: pg-salesgen [--help] [--dsn DSN] [-h HOST] [-p PORT] [-U USER]
[-d DBNAME] [--password PASSWORD] [--sslmode SSLMODE]
[--options OPTIONS] [--print-psql] [--logged] [--with-fk]
[--create-indexes] [--customers CUSTOMERS]
[--products PRODUCTS] [--target-gb TARGET_GB]
[--workers WORKERS] [--batch-orders BATCH_ORDERS]
[--avg-items AVG_ITEMS] [--max-items MAX_ITEMS]
[--order-note-len ORDER_NOTE_LEN]
[--item-note-len ITEM_NOTE_LEN] [--start-date START_DATE]
[--end-date END_DATE] [--unit-price-min UNIT_PRICE_MIN]
[--unit-price-max UNIT_PRICE_MAX] [--tax-rate TAX_RATE]
[--shipping-threshold SHIPPING_THRESHOLD]
[--shipping-fee SHIPPING_FEE]
[--progress-interval PROGRESS_INTERVAL] [--seed SEED]
[--order-id-stride ORDER_ID_STRIDE]
[--copy-orders-buf-mb COPY_ORDERS_BUF_MB]
[--copy-items-buf-mb COPY_ITEMS_BUF_MB]
[--join-timeout-sec JOIN_TIMEOUT_SEC]
Empty DB -> create schema/tables -> fill masters -> generate sales-like data FAST.
options:
--help, -? show this help message and exit
--dsn DSN libpq DSN. Overrides -h/-p/-U/-d.
-h, --host HOST database server host or socket directory (psql
compatible).
-p, --port PORT database server port (psql compatible).
-U, --user USER database user name (psql compatible).
-d, --dbname DBNAME database name (psql compatible).
--password PASSWORD database password (or use PGPASSWORD env / .pgpass).
--sslmode SSLMODE sslmode (require, verify-full, etc.).
--options OPTIONS libpq options string (e.g., "-c statement_timeout=0").
--print-psql Print equivalent psql command and exit.
--logged Create LOGGED tables (default UNLOGGED for speed).
--with-fk Create foreign keys (slower).
--create-indexes Create typical indexes + ANALYZE after load.
--customers CUSTOMERS
Number of customers to generate.
--products PRODUCTS Number of products to generate.
--target-gb TARGET_GB
Target size (orders+items) in GB.
--workers WORKERS Number of worker processes.
--batch-orders BATCH_ORDERS
Orders per batch per worker.
--avg-items AVG_ITEMS
Average number of items per order.
--max-items MAX_ITEMS
Max items per order.
--order-note-len ORDER_NOTE_LEN
Order note length.
--item-note-len ITEM_NOTE_LEN
Item note length.
--start-date START_DATE
Start date YYYY-MM-DD (UTC).
--end-date END_DATE End date YYYY-MM-DD (UTC).
--unit-price-min UNIT_PRICE_MIN
Min unit price (cents).
--unit-price-max UNIT_PRICE_MAX
Max unit price (cents).
--tax-rate TAX_RATE Tax rate (e.g., 0.10).
--shipping-threshold SHIPPING_THRESHOLD
Free shipping threshold (cents).
--shipping-fee SHIPPING_FEE
Shipping fee under threshold (cents).
--progress-interval PROGRESS_INTERVAL
Seconds between progress prints.
--seed SEED Base RNG seed.
--order-id-stride ORDER_ID_STRIDE
Per-worker order_id stride (must exceed total orders
per worker).
--copy-orders-buf-mb COPY_ORDERS_BUF_MB
COPY buffer for orders (MB).
--copy-items-buf-mb COPY_ITEMS_BUF_MB
COPY buffer for items (MB).
--join-timeout-sec JOIN_TIMEOUT_SEC
If >0, timeout seconds for joining each worker. 0
means wait indefinitely.
)
License
MIT License
Metadata
Release files for pgsalesgen 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pgsalesgen-0.1.7.tar.gz | 37.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pgsalesgen-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.3 kB
Release files / pgsalesgen-0.1.7.tar.gz
| Download URL | pgsalesgen-0.1.7.tar.gz |
|---|---|
| Size | 37.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
233621277ad32ddccf94edd75dc0dce66fab3bf66990eb8d51c8b3a25a19613b
|
|
BLAKE2b-256 checksum How to use checksums |
2d4f00a7a0a74056f0cca1fe0f9736929efc03fb0a1af97493051205b42a78f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / pgsalesgen-0.1.7-py3-none-any.whl
| Download URL | pgsalesgen-0.1.7-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1db2618e83b112d49c0858cb8daae51d606ddcf02a5ecf9a366225f7992cbe2a
|
|
BLAKE2b-256 checksum How to use checksums |
96c738c97301482ac06195b06312149c28244e57e4abaf020ff443cc6ec20ffe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for pgsalesgen 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.