Skip to content

jessetvogel/slash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

182 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Slash is a Python framework for web applications.

πŸ“¦ Installation

Slash can be installed directly using pip.

pip install "slash @ git+https://github.com/jessetvogel/slash.git@main"

Alternatively, slash can be installed by adding the following dependency to your pyproject.toml file.

[project]
dependencies = [
  "slash @ git+https://github.com/jessetvogel/slash.git@main"
]

πŸ“˜ Example

The following script will create a page with the text 'Hello world'. Run the script and go to http://localhost:8080 to see the result.

from slash import App
from slash.html import Span

def home():
    return Span("Hello world").style({"color": "red"})

if __name__ == "__main__":
    app = App()
    app.add_endpoint("/", home)
    app.run()

For more elaborate examples, take a look at the examples folder.

About

🐍 Python web framework

Resources

Stars

Watchers

Forks