Swytch 1.0.0

dotnet add package Swytch --version 1.0.0
                    
NuGet\Install-Package Swytch -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Swytch" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Swytch" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Swytch" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Swytch --version 1.0.0
                    
#r "nuget: Swytch, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Swytch@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Swytch&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Swytch&version=1.0.0
                    
Install as a Cake Tool

logo .NET

Swytch is a web framework written in C#. It is lightweight, fast and offers an alternative and refreshing way to author web services like REST APIs, static sites and web applications.It provides an expressive routing API, built-in templating with RazorLight, support for asynchronous job processing using Actors, and seamless database integration with Dapper.

Make the swytch and try it out!

SOME FEATURES

  • Fast and Lightweight - Designed for high performance with minimal overhead.
  • Minimal and Expressive Routing – Easily define routes and handlers for your web application with a clean API.
  • Path Parameters – Extract parameters directly from the URL for dynamic routing.
  • Templating with RazorLight – Supports Razor-based templating for server-side rendering of dynamic content.
  • Precompiled Templates – Supports template pre-compilation for improved performance.
  • Built-in Lightweight ORM – Includes Dapper for efficient data access and interaction with databases.
  • Actor-Based Asynchronous Jobs – Execute background tasks and non-blocking job execution using the built in Swytch Actor pool(Actor system).
  • Middleware Support – Extend request handling with custom middleware
  • Resilient Request Handling – Exceptions occurring during a request are isolated to that request, preventing failures from affecting the entire application.

⚡ Basic Swytch App

//create a swytchapp
var app = new SwytchApp();

//set up route 
app.AddAction("GET", "/", async (context) => {

    context.ToOk("Welcome to Swytch!");
    
});

//start app
await swytchApp.Listen(); 

Run the application and navigate to http://localhost:8080/.

Check out the documentation for more information
Check out the repository on github

🤝 Contributing

Contributions are highly valued(seriously), whether it's proposing new features, suggesting improvements, or reporting bugs. Your input helps make Swytch even better—feel free to submit a PR to the github repo! 🚀

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 232 4/29/2025
1.0.0-beta5 245 4/17/2025
1.0.0-beta4 204 3/13/2025
1.0.0-beta3 185 3/13/2025
1.0.0-beta2 177 3/13/2025
1.0.0-beta1 123 2/23/2025