• Stars
    star
    99
  • Rank 343,315 (Top 7 %)
  • Language
    Python
  • Created about 12 years ago
  • Updated almost 12 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

a skeleton for flask

flask-base

a skeleton for flask

author: notedit

virtualenv+flask+gunicorn+supervisor环境搭建与部署

这个代码库包含了一个flask web站的基本框架,可以通过如下的步骤把一个生产环境搭建起来

新建一个用户

新建一个用户名wwwuser 所属wwwuser组的用户,具体的步骤可自行搜索

安装virtualenv和依赖

sudo pip install virtualenv
sudo pip install virtualenvwrapper

这样就安装好virtualenv 和 virtualenvwrapper,然后建立一个虚拟环境,

source /usr/local/bin/virtualenvwrapper.sh
mkvirtualenv --no-site-packages online

这样就建立了一个online的虚拟环境,为了以后不用每次都执行source /usr/local/bin/virtualenvwrapper.sh,可以把这行语句放到 ~/.bashrc 中去.

进入flask-base中,安装需要的依赖

pip install -r requirement.txt

查看目录和运行单元测试

装完依赖之后就可以查看代码布局了,代码很简单,你可以在此基础上添加一些自己的东西.

在代码的根目录你可以看到一个manage.py,这个是整个代码的入口,你可以运行

python  manage.py  

你可以添加自己想要的命令,比如新建用户,迁移一些数据等等.

还包含了一些测试代码,你可以在代码的根目录运行单元测试:

nosetest  tests

supervisor

在正常的网站运行中,你需要一些进程管理工具,这里使用supervisor,代码库中已经包含一个 supervisord 的配置文件,你可以添加自己的服务.

More Repositories

1

media-server-go

WebRTC media server for go
Go
510
star
2

rtmp-to-webrtc

rtmp to webrtc
JavaScript
209
star
3

media-server-go-demo

webrtc media server go demo
Go
201
star
4

rtclive

(WIP)A WebRTC Edge Low Latency Broadcast Server
Go
74
star
5

rtp-streamer

rtp record and rtp streamer
JavaScript
72
star
6

gstreamer-webrtc

webrtc streamer based on gstreamer
Python
66
star
7

motikyapp

a video app just like vine
Objective-C
59
star
8

gstreamer-go

gstreamer wrap for golang
Go
57
star
9

rtmp-lib

golang rtmp lib
Go
46
star
10

motiky

backend api of the motiky app
40
star
11

rtc-rtmp

WebRTC to RTMP and RTMP to WebRTC
Go
36
star
12

janus-go

janus gateway golang api
Go
36
star
13

rtmp

golang rtmp lib
Go
35
star
14

sdp

sdp encode/decode for golang
Go
29
star
15

bls

RTMP framework for Nodejs
C++
18
star
16

webrtc-build

WebRTC auto build scripts for windows/mac/linux/iOS/Android
Python
17
star
17

oocrpc

a rpc based on bson, you can call the remote golang service from the python or cpp client
Go
17
star
18

gst-go-demo

demos for https://github.com/notedit/gst
Go
16
star
19

webrtc-insertable-stream-play

webrtc insertable stream play
HTML
12
star
20

CVPixelBuffer-Convert

CVPixelBuffer convert NV12 I420 BGRA
Objective-C
12
star
21

janus-gateway-ios

ios webrtc sdk talks to janus gateway
Objective-C
11
star
22

webrtc-build-release

webrtc build release
10
star
23

pion-webrtc-recorder

pion webrtc recorder
Go
9
star
24

missing

JavaScript
9
star
25

openh264.js

build openh264 js
C++
8
star
26

openai-play

openai play
HTML
7
star
27

media-server-go-native

media server native code
C
7
star
28

eightfoot

another try about the django and golang mix
Go
6
star
29

gstreamer-rtmp

gstreamer media frame to rtmp for golang
C
6
star
30

janus-ts

janus-gateway websocket lib
TypeScript
6
star
31

webaudio-mixer

webaudio audio mixer
JavaScript
5
star
32

bsonrpc

a rpc from http://code.google.com/p/vitess/
5
star
33

webrtcon-2018-workshop

webrtcon 2018
JavaScript
5
star
34

go-sdp-transform

golang sdptransform
Go
5
star
35

rtc-to-rtmp

rtc to rtmp
HTML
5
star
36

rtmp-example

rtmp example
Go
5
star
37

gstreamer-command

gstreamer commands
5
star
38

RTCLive-js

RTCLive-js
TypeScript
4
star
39

webrtc.framework

webrtc ios/mac framework
Objective-C
4
star
40

webrtc-simulcast

simplest webrtc simulcast demo
TypeScript
4
star
41

screen-stream

screen stream
Objective-C
4
star
42

libWebRTC-Android

libWebRTC lib 2016-07-20 version
4
star
43

webrtc-android-h264

webrtc android h264 support
3
star
44

transcodego

golang transcode
Go
3
star
45

resample

audio encoder/decoder/resampler
Go
3
star
46

go-streamer.bak

make golang/cgo/ffmpeg work together
C
3
star
47

protoo-swift

protoo swift
Swift
3
star
48

webrtc-broadcast

webrtc broadcast
TypeScript
3
star
49

msgpack-oocrpc

oocrpc with the msgpack
Go
3
star
50

webrtc-bench

webrtc bench tools
Go
3
star
51

libsrs-rtmp-android

rtmp client build for android
C++
2
star
52

whip-server

WebRTC whip server
JavaScript
2
star
53

opus-to-aac

opus to aac
Go
2
star
54

webrtc-server

(wip)webrtc server
Go
2
star
55

lowlatency-streaming-demo

low latency video streaming demo code
Objective-C
2
star
56

acodec

audio encoder/decorder/resample
Go
2
star
57

webrtc-transport

webrtc transport based on pion's dtls transport
Go
2
star
58

CVPixelBufferResize

CVPixelBuffer Resize with metal
Objective-C
2
star
59

RunRpc

a multi process Rpc based on tornado
Python
2
star
60

basesite

the basic code i use to build a website with django and mongodb and gunicorn
Python
2
star
61

xiaobanke-recorder

xiaobanke recorder
TypeScript
2
star
62

webrtc-live-relay

webrtc live relay from another webrtc media server
TypeScript
2
star
63

webrtc-gpt

webrtc with chatgpt
Python
1
star
64

media-server-node-end-to-end

media-server-node end to end
JavaScript
1
star
65

datachannel-play

datachannel play
HTML
1
star
66

webobs-poc

OBS on the web proof of concept
JavaScript
1
star
67

sdp-cpp

sdp for cpp
C++
1
star
68

bson

gobson's fork
Go
1
star
69

avmixer

audio/video mixer based on gstreamer
Python
1
star
70

webchan

real time server build on websocket
Go
1
star
71

wxLive-server

微信小程序 互动视频 服务端
TypeScript
1
star
72

WebRTC-Debug

WebRTC Debug
Objective-C
1
star
73

webassembly-play

webassembly play
JavaScript
1
star
74

rust-learn

learn rust
Rust
1
star
75

turn-bench

benchmark the turnserver
Go
1
star
76

tauri-play

tauri demo
1
star
77

socketio-transaction

socketio based transaction
JavaScript
1
star
78

acodec-go

audio encoder/decoder/resampler for go
Go
1
star
79

relay-server

relay server based on turn
Go
1
star
80

avmixer-test

audio video mixer
Python
1
star
81

webcodecs-webrtc-play

webcodecs webrtc
HTML
1
star
82

rtcplayer-ios

rtcplayer for ios
Objective-C
1
star
83

dot-call-android

one to one video call sdk
1
star
84

CameraFilters

the simplest camera filters, can works well with dotEngine
Java
1
star
85

dotlive-wx

小程序 直播连麦
JavaScript
1
star
86

notedit-git

notedit's git
Python
1
star