Skip to main content

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.

All you have to do is import the module and use it as follows.

from prompter import PromptGenerator
p = PromptGenerator()
'Dani Szabó volunteering at Johannesburg.'

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!

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

prompter_r3ap3rpy-0.0.2.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

prompter_r3ap3rpy-0.0.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file prompter_r3ap3rpy-0.0.2.tar.gz.

File metadata

  • Download URL: prompter_r3ap3rpy-0.0.2.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for prompter_r3ap3rpy-0.0.2.tar.gz
Algorithm Hash digest
SHA256 7d1defe161e058c4d3a501c8b981c1ff060f751dc9a3e683c9b20d4dcc15f3e2
MD5 69173b7df589a7b1d6e888971f1b6464
BLAKE2b-256 5a8319406589025f9e0f8b3c059fbd549df787bf632da0fdde92e4c982ea1f48

See more details on using hashes here.

File details

Details for the file prompter_r3ap3rpy-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for prompter_r3ap3rpy-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6b9c3bd975940c7c9ee7a5d499a8ddb5b93f6d9009b0881a3f54bd76ce318934
MD5 4fbc7916505bfe247e076938832dfa6f
BLAKE2b-256 4c0244a331c51a11a5bc13ed6550985d98670bfe1397f200a0f1d5fa96a8425a

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