Welcome to Zenith! This guide will help you get started with Zenith, a powerful Python framework for web development.
To install Zenith, follow these steps:
-
Ensure you have Python 3.8 or higher installed on your system.
-
Open a terminal or command prompt.
-
Run the following command to install Zenith using pip:
pip install ZenithLib -
Wait for the installation to complete.
Congratulations! You have successfully installed Zenith on your system.
To start building web applications with Zenith, follow these steps:
-
Create a new Python file for your application, e.g.,
app.py. -
Import the necessary modules:
import Zenith -
Create a new Zenith application instance:
app = Zenith.WApp() -
Define your webpage content using Zenith's declarative syntax. For example:
homePageContent = ''' <Container> <Header idName="header">Hello world from Zenith</Header> </Container> ''' -
Use the Zenith
Builderclass to build the webpage:builder = Zenith.Builder({"home": homePageContent}) built = builder.Build() -
Register the webpage routes with your Zenith application:
for route in builder.getRoutes(): app.register_route(f'/{route}', built[route])You can customize the route URL as per your requirements.
-
Serve the Zenith application:
app.serve() -
Open your web browser and visit
http://localhost:8000to see your Zenith application in action.
Congratulations! You have created and served your first Zenith web application.
- Check out the Zenith Documentation for detailed information on Zenith's features, components, and API reference.
- Explore the example applications provided in the Zenith repository to learn more about building complex web applications.
- Join the Zenith community to ask questions, share your experiences, and get support.
Enjoy building powerful and scalable web applications with Zenith!