Comments (4)
Yes I know it could be done like this, but a config t's definitely better
from unit.
Adding the virtualenv dir from the app script seem to work for now:-
import os
import sys
CWD = os.path.abspath(os.path.dirname(__file__))
sys.path.append(os.path.join(CWD, 'venv/lib/python2.7/site-packages'))
import requests
def application(environ, start_response):
start_response('200 OK', [('Content-Type', 'text/plain')])
resp = requests.get('https://httpbin.org/get')
return [resp.content]
But of course having specific config is way much better.
from unit.
Is it part of a release yet? I don’t see any mention of virtualenv in documentation (just this ticket)?
from unit.
@sboisson it is: https://www.nginx.com/blog/unit-0-3-beta-release-available-now/
The documentation is outdated a bit.
from unit.
Related Issues (20)
- unitctl: fix up the output format tag's default HOT 1
- Inconsistency in Supported Language Count Between Repository Description and README HOT 1
- build fails on freebsd and libressl HOT 1
- grpc idle timeout is affected by `client_header_timeout header` HOT 2
- The issue about try_files cmd HOT 2
- review unit type choice HOT 1
- How to modify the value of nginx-unit backlog parameter? I want to increase it to meet my performance needs. It's time to change the default value, 511 is no longer applicable HOT 26
- Listeners 127.0.0.1:xx is not working, The prompt already exists, but I haven't seen the configuration anywhere HOT 3
- Upgrade wasm-wasi-component to latest Wasmtime HOT 2
- WAF
- Release 1.33 meta tasks HOT 10
- RHEL ARM Packages
- Mismatch in content of `SECURITY.txt` in Units and e.g. NGINX Agents / NJS Repositories HOT 4
- "error": "Failed to apply new configuration." HOT 3
- Current git HEAD tests issue a Rust-related error HOT 6
- Current git HEAD tests fail if Unit is built without njs: test_routes_match_if HOT 4
- Current git HEAD tests fail on Ubuntu 24.04: isolation_rootfs HOT 6
- Current git HEAD tests fail on FreeBSD 14 / Python 3.11.9: test_python_factory_invalid_callable_value HOT 7
- HTTP request is sent twice in Node app HOT 7
- docker: access log is owned by root HOT 2
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 unit.