X9 is a user-friendly multi-use module made by PyModuleDev.
Project description
X9 by Pymoduledev
NOTE: X9 only works in Python 3.1+
Updates
1.0.1 - bug fixes in description
1.0.0 - initial release
What is X9?
X9 is a comprehensive Python module developed by pymoduledev
, offering three essential classes that cater to various programming needs. The module includes the following classes:
gui
: Provides functionalities for creating and managing graphical user interfaces (GUIs) usingtkinter
.web
: Enables the development of web applications usingwsgiref.simple_server
'smake_server
andlogging
.maths
: An improved version of the standardmath
module, offering additional mathematical capabilities made usingmath
.
How to Install X9
You can easily install X9 using pip
:
pip install x9
How do I use X9?
X9 is very easy to understand, and you can take an tutorial here right now.
GUI Class
The gui
class facilitates the creation of user-friendly graphical interfaces. Here's a simple example:
from x9 import gui
window = gui.new()
window.bg(color='#000000')
window.title('My Window')
window.favicon('path/to/favicon.ico')
window.resize("1880x600")
textbox = window.textbox(placeholder='type here...')
textbox.resize(100)
text = gui.label('Hey!')
gui.font(text, 'Arial', 16, is_bold=True)
button = window.button(value='submit',command=lambda: print(textbox.get()))
window.run()
Web Class
With the web
class, you can effortlessly build web applications and APIs. Here's a basic example:
from x9 import web
app = web() #Create the web instance
def index():
return '<p>Hello, World!</p>'
def render_html():
return app.html('index.html') #This will get the contents of the index.html file assuming it is in the same directory as the Python file
app.new(index, '/')
app.new(render_html, '/render-html')
app.run()
Maths Class
The maths
class extends the capabilities of the standard math
module. Take advantage of its additional functions:
from x9 import maths as ImprovedMath
# Using Algebra functions
a, b, c = 1, -3, 2
roots = ImprovedMath.Algebra.quadratic_formula(a, b, c)
print(f"The roots of the quadratic equation {a}x^2 + {b}x + {c} = 0 are: {roots}")
# Using Calculus functions
coefficients = [1, 2, 3]
x = 2
derivative_at_x = ImprovedMath.Calculus.differentiate_polynomial(coefficients, x)
print(f"The derivative of the polynomial {coefficients} at x={x} is: {derivative_at_x}")
# Using Statistics functions
data = [2, 4, 6, 8, 10]
mean_value = ImprovedMath.Statistics.mean(data)
print(f"The mean of the data {data} is: {mean_value}")
variance_value = ImprovedMath.Statistics.variance(data)
print(f"The variance of the data {data} is: {variance_value}")
Contributions
We welcome contributions from the community to enhance X9 further. Feel free to share your ideas, report bugs, or request new features at the official PyModuleDev website(pymoduledev.neocities.org)
License
X9 is distributed under the Apache License 2.0. A copy of the License can be found at https://www.apache.org/licenses/LICENSE-2.0.txt.
Contact
For any questions or support, you can reach out to pymoduledev at pxcom@mail.com
.
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.