跳转到主要内容

rawgithub

项目描述

rawgithub是一个简单的WSGI服务器,允许您从Github提供服务文件,即使您需要提供access_token。

只需这样做

GET /:owner/:repo/:file?[access_token=<your_token>]&[ref=master]

就这样。

运行服务

pserve rawgithub.ini

使用WSGI运行

# -*- coding: utf-8 -*-
import os

cfg_dir = os.path.dirname(__file__)
env_dir = os.path.join(cfg_dir, 'var', 'venv')

activate_this = os.path.join(env_dir, 'bin', 'activate_this.py')
execfile(activate_this, dict(__file__=activate_this))

from pyramid.paster import get_app, setup_logging
ini_path = os.path.join(cfg_dir, 'rawgithub.ini')
setup_logging(ini_path)
application = get_app(ini_path, 'main')

由以下机构支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面