Skip to main content

Tags Generator

A Python library to generate a tags list from a text using OpenAI.

Features

  • Generate tags list from a text
  • Limit the number of tags (max_tags)
  • Order tags by relevance or randomly (order)

Installation

Install the package using pip:

pip install tags-generator

Usage

from tags_generator import TagsGenerator

# Set your OpenAI API key
openai_api_key = "your_openai_api_key"

# Initialize the TagsGenerator with custom attributes
tg = TagsGenerator(openai_api_key, max_tags=5, order='relevance')

# Generate tags from a text
text = "Create a step-by-step guide on building a pip library to distribution the library."
tags = tg.generate_tags(text)

print(tags)

Attributes

  • max_tags (integer, default=5): Define the maximum number of tags in the output list.
  • order (string, default='relevance'): Specify the order of tags based on their relevance. Options are 'relevance' or 'random'.

License

This project is licensed under the MIT License.

Release files for tags-generator 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tags-generator 0.4.0
File Size Uploaded
tags-generator-0.4.0.tar.gz 2.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tags-generator 0.4.0
File Interpreter ABI Platform
tags_generator-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.4 kB

Release files / tags-generator-0.4.0.tar.gz

Download URL tags-generator-0.4.0.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3e131e2a436601ff76f7fe9406d4f8ee16e813fc5125eef626edce80c3510c06
BLAKE2b-256 checksum
How to use checksums
f96046089dd504bea3adb942f4e3fd543d772b0e559180f66391e5b53bf1fdf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.1

Release files / tags_generator-0.4.0-py3-none-any.whl

Download URL tags_generator-0.4.0-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6cd6a5f1da97575a4f1bb2b8186e0634cc37315b3d93fc0cfcb53986026dc309
BLAKE2b-256 checksum
How to use checksums
b3d01b594eef42230a5259fd59259cccd07ab45e1bf39322e9dcd3e40bf8d895
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.1

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page