Comments (1)
As of today, there's no support for this in CLI. But you can run Granian via Python code and customise the target_loader
parameter of Granian.serve
.
Given your use-case, probably it's easier to write a run.py
file which runs the factory, eg:
from your_module import your_factory
app = your_factory()
and point Granian to run:app
. It might also be worth checking #35.
from granian.
Related Issues (20)
- Access log logs wrong status on file responses HOT 5
- Thread panic in FastAPI streaming response HOT 6
- Add CLI option to provide a factory function name
- Add Granian extended reloading options HOT 1
- granian.Granian method is failing HOT 2
- Add documentation for "programmatic" usage HOT 8
- Avoid to run Python event-loop in WSGI protocol
- Add support for SSL private key encryption
- Explore the possibility to have sync RSGI interfaces
- Logs not displayed for webscoket connections HOT 2
- Granian not working with fastapi FileResponse HOT 2
- Python Rotating File Handler Logging Error HOT 1
- Can't load wsgi file without .py ext HOT 3
- Is it possible to have gevent support? HOT 2
- Systemd notify protocol HOT 2
- Stop responding in a few days in wsgi mode HOT 3
- Maximum number of open files HOT 4
- Can't catch exception raised during execution of an `asyncio.Task` if running with `--opt` HOT 1
- Process X-Forwarded-* headers HOT 2
- Session Affinity / sticky sessions using Cookies HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from granian.