Skip to content

Commit

Permalink
Add cli doc for database gen
Browse files Browse the repository at this point in the history
  • Loading branch information
rbaltrusch committed Jun 22, 2024
1 parent 097ebc5 commit e27ae23
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,31 @@ Run the shop application by installing the package using pip, then calling it:

Note that the first time the package is called, it automatically generates a fresh database filled with random data. This make take a few seconds.

### Custom database generation

The database generation can be customized with the `python -m desktop.database.database generate` CLI:

```
usage: database.py [-h] [--name NAME] [--fast] [--minimal] [--transactions TRANSACTIONS] [--users USERS] [--products PRODUCTS] {generate}
Database generation interface
positional arguments:
{generate} database action to be performed
optional arguments:
-h, --help show this help message and exit
--name NAME The name of the database
--fast reduces number of password hashing operations
--minimal reduces size of all tables to 1
--transactions TRANSACTIONS
pass number of transactions to be added to database
--users USERS pass number of users to be added to database
--products PRODUCTS pass number of products to be added to database
```

To display the CLI doc above, run `python -m desktop.database.database -h`.

## ⚠️ State of the repository ⚠️

This repository is unlikely to receive new features in the future, although maintenance and small fixes will still be done.
Expand Down

0 comments on commit e27ae23

Please sign in to comment.