No project description provided
Project description
Welcome
This is a small module that can be used to generate prompts for text-to-image generative AI.
The package is available on pypi.
In order to install the package you would use the following command.
pip install propmpter-r3ap3rpy
Then all you have to do is import the module and use it as follows.
from prompter import PromptGenerator
p = PromptGenerator()
p()
'Madonna grilling at Jerusalem.'
p()
'Natalie Portman cycling at Mumbai.'
p()
'John von Neumann baseball at Tower of London.'
You have the option to update the data.json.
from prompter import PromptGenerator
p = PromptGenerator()
p.update("People","Dani Ernő")
When updating the data the section is converted to lower-case and verified, also the value is checked whether it's in the section converted to lower-case before checking, if not it's added, otherwise an exception is thrown.
You can also delete from the data.json entries. By default it will delete first occurence from each section, but you can pass the all_occurence=True to remove all occurences.
from prompter import PromptGenerator
p = PromptGenerator()
p.delete("Dani Ernő") # deletes value from every sections
p.delete("people","Pablo Picasso") # deletes value from given section
You have the option to get basic stats from your database.
from prompter import PromptGenerator
p = PromptGenerator()
p.stats
###############################################
# people # 107 #
# activity # 107 #
# location # 107 #
###############################################
The details attribute will print the content in a table format to your terminal.
You have restore_db() which is a static method, it allows you to restore any backups in the data folder, the backup_db() which is an instance method allows you to backup the actual state of the database to a default or custom filename!
In order to run the tests you can do the following.
git clone https://github.com/r3ap3rpy/prompter
cd prompter
pip install -r requirements.txt
pytest -vvvvv
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prompter_r3ap3rpy-0.0.4.tar.gz.
File metadata
- Download URL: prompter_r3ap3rpy-0.0.4.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff875f06234dc5e48bc287c31c13e2513ead8aba6eafccbc8c295946d23ef24e
|
|
| MD5 |
c599fd7fdbdad388a88a55261a8d7066
|
|
| BLAKE2b-256 |
72388fcb60c6fe4f83dc72756eb9ce6c19d002c5f13d7b3b6765c04baa31e77b
|
File details
Details for the file prompter_r3ap3rpy-0.0.4-py3-none-any.whl.
File metadata
- Download URL: prompter_r3ap3rpy-0.0.4-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d846b51773ebd604409bae5859e0f4b290190cb3faa2bbf059af358a950d6d00
|
|
| MD5 |
6c37e8d7e51ed1bd4f3f98bbc60cf948
|
|
| BLAKE2b-256 |
1da3e20f74ef61c2ad8b61791a91152d05779d6ae080eef3e3110fc467bd3852
|