Library with many uses
Project description
XXT
XXT is a multifunctional Python library designed to enhance various aspects of programming by providing an extensive set of functions and classes related to time, numbers, and randomization.
Uses
- Wait function
- Clear function
- Functions to get time and date
- Classes for a chatbot, numbers and random choices
Installation
pip install xxt
Changelog
0.0.1 (17/7/2023)
- First Release
0.0.2 (20/07/2023)
- Better Documentation
- Changelog
0.0.3 (22/07/2023)
- Chatbot Class
Documentation
Number Class
import xxt
ten = xxt.Number(10) #Make the object
print(ten) # Print the traits
print(ten.prime) # Print whether it is a prime or not
print(ten.evenodd) # Print whether it is even or odd
print(ten.numtype) # Print whether it is a float or an integer
print(ten.square) # Print whether it is a square or not
print(ten.cube) # Print whether it is a cube or not
print(ten.palindrome) # Print whether it is a palindrome or not
print(ten.strobogrammatic) # Print whether it is strobogrammatic (when turned upside down is the same)
print(ten.strobogrammaticdifferent) # Print whether it is strobogrammatic different (when turned upside down is a different number)
Chatbot Class
import xxt
bot = xxt.Chatbot("Bot", "You are a friendly bot.", "Replace with OpenAI API key") # Make the object
message = input("Message: ") # Get the message
print(bot.chat(message)) # Chat with the bot and print the response
bot.clear() # Clear the chat history
Random Class
import xxt
ran = xxt.Random()
list = ["Hello", "World", "How", "Are", "You"]
print(ran.integer(1, 10)) # Print a random integer between 1 and 10
print(ran.float(1, 10)) # Print a random float between 1, 10
print(ran.choice(list)) # Print a random choice from 'list'
Other Functions
import xxt
print(f"{xxt.gettime()} on {xxt.getdate()}") # Prints (time) on (date)
xxt.wait(1) #Waits one second
xxt.clear() # Clears console
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
xxt-0.0.3.tar.gz
(3.9 kB
view details)
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
xxt-0.0.3-py3-none-any.whl
(3.7 kB
view details)
File details
Details for the file xxt-0.0.3.tar.gz.
File metadata
- Download URL: xxt-0.0.3.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d6b446a1cec66f66cbfe9becc48fa7be72f5dd3d716a51d35349c356dfc3660
|
|
| MD5 |
41cefb3e260c782c965a78ebdf432296
|
|
| BLAKE2b-256 |
0d0f95bcfb0397ea4836b744f27b3eb4574d48ff4af7eb26f6bf25f9a674c5c6
|
File details
Details for the file xxt-0.0.3-py3-none-any.whl.
File metadata
- Download URL: xxt-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0767e4a0babab3f24999dfc087ddcb9b7a398ec3cd9a2147c3a72e6e28db8853
|
|
| MD5 |
caddbb99edb004bbfcabd83b38d2c4fa
|
|
| BLAKE2b-256 |
9981d2e52704bea03f27eff03253d2086f4652076143ba479450d1bdfa80ee55
|