
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
A Python library which includes lots of helpful classes, types and functions aiming to make common programming tasks simpler.
$\color{#8085FF}\textsf{XulbuX}$ is library that contains many useful classes, types, and functions, ranging from console logging and working with colors to file management and system operations. The library is designed to simplify common programming tasks and improve code readability through its collection of tools.
For precise information about the library, see the library's wiki page.
For the libraries latest changes and updates, see the change log.
Run the following commands in a console with administrator privileges, so the actions take effect for all users.
Install the library and all its dependencies with the command:
pip install xulbux
Upgrade the library and all its dependencies to their latest available version with the command:
pip install --upgrade xulbux
Import the full library under the alias xx
, so its constants, classes, methods and types are accessible with xx.CONSTANT.value
, xx.Class.method()
, xx.type()
:
import xulbux as xx
So you don't have to import the full library under an alias, you can also import only certain parts of the library's contents:
# CONSTANTS
from xulbux import COLOR, CHARS, ANSI
# Classes
from xulbux import Code, Color, Console, ...
# types
from xulbux import rgba, hsla, hexa
This is what it could look like using this library for a simple but very nice looking color converter:
from xulbux import COLOR # CONSTANTS
from xulbux import FormatCodes, Console # Classes
from xulbux import hexa # types
def main() -> None:
# LET THE USER ENTER A HEXA COLOR IN ANY HEXA FORMAT
input_clr = FormatCodes.input(
"\n[b](Enter a HEXA color in any format) [dim](>) "
)
# ANNOUNCE INDEXING THE INPUT COLOR
Console.log(
"INDEX",
"Indexing the input HEXA color...",
start="\n",
title_bg_color=COLOR.blue,
)
try:
# TRY TO CONVERT THE INPUT COLOR INTO A hexa() COLOR
hexa_color = hexa(input_clr)
except ValueError:
# ANNOUNCE THE ERROR AND EXIT THE PROGRAM
Console.fail(
"The input HEXA color is invalid.",
end="\n\n",
exit=True,
)
# ANNOUNCE STARTING THE CONVERSION
Console.log(
"CONVERT",
"Converting the HEXA color into different types...",
title_bg_color=COLOR.tangerine,
)
# CONVERT THE HEXA COLOR INTO THE TWO OTHER COLOR TYPES
rgba_color = hexa_color.to_rgba()
hsla_color = hexa_color.to_hsla()
# ANNOUNCE THE SUCCESSFUL CONVERSION
Console.done(
"Successfully converted color into different types.",
end="\n\n",
)
# PRETTY PRINT THE COLOR IN DIFFERENT TYPES
FormatCodes.print(f"[b](HEXA:) [i|white]({hexa_color})")
FormatCodes.print(f"[b](RGBA:) [i|white]({rgba_color})")
FormatCodes.print(f"[b](HSLA:) [i|white]({hsla_color})\n")
if __name__ == "__main__":
main()
FAQs
A Python library which includes lots of helpful classes, types and functions aiming to make common programming tasks simpler.
We found that xulbux demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.