Module Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Expr Call NameLoad Str keyword Str Expr Call NameLoad Str keyword Str keyword Call AttributeLoad NameLoad attr Str Str Expr Call NameLoad Str keyword Str keyword NameLoad keyword Call NameLoad Call AttributeLoad NameLoad attr Str Str Expr Call NameLoad Str keyword Str keyword Call NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call NameLoad Str keyword Str keyword Call NameLoad Call AttributeLoad NameLoad attr Str Str keyword NameLoad Expr Call NameLoad Str keyword Str keyword Call NameLoad Call AttributeLoad NameLoad attr Str Str keyword NameLoad Expr Call NameLoad Str keyword Str keyword NameLoad keyword Call NameLoad Call AttributeLoad NameLoad attr Str BinOpMult Call NameLoad Num Expr Call NameLoad Str keyword Str keyword Call AttributeLoad NameLoad attr Str AttributeLoad Call AttributeLoad NameLoad attr attr Expr Call NameLoad Str keyword Str keyword NameLoad Expr Call NameLoad Str keyword Str keyword NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Str Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call NameLoad Str keyword Str keyword NameLoad keyword Call AttributeLoad NameLoad attr Str Call NameLoad Call AttributeLoad Str attr Call AttributeLoad Str attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str Str Expr Call NameLoad Str keyword Str keyword Call NameLoad Call AttributeLoad NameLoad attr Str Str keyword NameLoad Expr Call NameLoad Str keyword Str keyword Call NameLoad Call AttributeLoad NameLoad attr Str Str keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Str Expr Call NameLoad Str keyword Call AttributeLoad Str attr NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad Str NameLoad kwarg body Return Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If BoolOpAnd CompareEq Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TryExcept body If UnaryOpNot Call NameLoad GeneratorExp Call NameLoad AttributeLoad NameLoad attr comprehension NameStore TupleLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr FunctionDef arguments args defaults vararg body Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad AttributeLoad NameLoad attr decorator_list Expr Call AttributeLoad NameLoad attr Str For NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Import alias Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad decorator_list If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Lambda arguments args defaults Call NameLoad AttributeLoad NameLoad attr If UnaryOpNot BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr BinOpMult NameLoad Num NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Num orelse Expr Call NameLoad Num decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A tempfile N/A uuid N/A errno N/A signal N/A pwd N/A os slimurl URL tornado.ioloop IOLoop tornado.httpserver HTTPServer tornado.log gen_log log tornado.options options define tornado.process cpu_count tornado.concurrent futures tornado.web Application tornado.httpclient AsyncHTTPClient tornado.ioloop PeriodicCallback pypi_server ROOT pypi_server.cache HOUR Cache pypi_server.handlers.pypi.proxy.client PYPIClient pypi_server.db init_db pypi_server.db.packages PackageFile pypi_server handlers N/A N/A define config help Configuration file N/A N/A define address help Listen address (default 127.0.0.1) [ENV:ADDRESS] default N/A N/A os getenv ADDRESS 127.0.0.1 N/A N/A define port help Listen port (default 8080) [ENV:PORT] type int default N/A int N/A N/A os getenv PORT 8080 N/A N/A define debug help Use for attach a debugger default N/A bool N/A N/A os getenv DEBUG type bool N/A N/A define gzip help Compress responses (default False) [ENV:GZIP] default N/A bool N/A N/A os getenv GZIP 0 type bool N/A N/A define proxy-mode help Process X-headers on requests (default True) [ENV:PROXY_MODE] default N/A bool N/A N/A os getenv PROXY_MODE 1 type bool N/A N/A define pool-size help Thread pool size (default cou_count * 2) [ENV:POOL_SIZE] type int default N/A int N/A N/A os getenv POOL_SIZE N/A N/A cpu_count 2 N/A N/A define secret help Cookie secret (default random) [ENV:SECRET] default N/A N/A os getenv SECRET N/A N/A N/A uuid uuid4 bytes N/A N/A define user help Change UID of current process (not change by default) default None N/A N/A define storage help Packages storage (default $CWD/packages) [ENV:STORAGE] type str default N/A N/A N/A os path abspath N/A N/A os getenv STORAGE N/A N/A N/A os path join N/A N/A N/A os path abspath N/A N/A os path curdir packages N/A N/A define database help Application database (default sqlite:///{storage}/metadata.db) [ENV:DB] type URL default N/A N/A os getenv DB N/A URL N/A N/A sqlite://{0} format N/A N/A / join N/A N/A N/A os path split N/A N/A N/A os path join N/A N/A N/A os path abspath N/A N/A os path curdir packages metadata.db N/A N/A define max_http_clients help Maximum HTTP Client instances for proxy requests (default 25) [ENV:MAX_CLIENTS] default N/A int N/A N/A os getenv MAX_CLIENTS 25 type int N/A N/A define pypi_server help PYPI service url. Using for proxy. (default https://pypi.python.org/) [ENV:PYPY_SERVER] default N/A URL N/A N/A os getenv PYPI_SERVER https://pypi.python.org/ type URL N/A default_cache_dir N/A N/A N/A os path join N/A N/A tempfile gettempdir pypi-server-cache N/A N/A define cache_dir help N/A N/A Directory for storing cache files (default: "{}") format default_cache_dir default default_cache_dir create_app N/A N/A debug secret gzip N/A False False kwargs N/A N/A N/A Application base_dir ROOT debug debug reload debug cookie_secret secret template_path N/A N/A N/A os path join ROOT templates default_handler_class N/A handlers DefaultHandler gzip gzip handlers N/A handlers ROUTES options options kwargs N/A run N/A N/A N/A N/A N/A N/A N/A options parse_command_line N/A N/A options config N/A N/A N/A N/A options parse_config_file N/A options config N/A N/A options storage N/A N/A N/A os path abspath N/A options storage N/A N/A N/A N/A N/A os getuid 0 N/A options user N/A N/A pw N/A N/A pwd getpwnam N/A options user N/A N/A uid gid N/A N/A pw pw_uid N/A pw pw_gid N/A N/A N/A log info Changind user to %s [%s:%s] N/A options user uid gid N/A N/A N/A os setgid uid N/A N/A N/A os setuid uid N/A N/A N/A N/A N/A all N/A N/A f N/A options storage N/A f N/A N/A N/A os path exists N/A N/A os path isdir N/A N/A N/A N/A log info Creating new package storage directory: "%s" N/A options storage N/A N/A N/A os makedirs N/A options storage on_interrupt N/A N/A N/A args N/A N/A N/A N/A log warning Receiving interrupt signal. Application will be stopped. N/A N/A exit N/A errno EINTR N/A N/A N/A N/A log debug Preparing signal handling N/A sig N/A N/A signal SIGINT N/A signal SIGTERM N/A signal SIGQUIT N/A N/A N/A N/A signal signal sig on_interrupt handle_pdb N/A N/A sig frame N/A N/A N/A pdb N/A N/A N/A N/A N/A pdb Pdb set_trace frame N/A N/A N/A options debug N/A N/A N/A N/A signal signal N/A signal SIGUSR2 handle_pdb N/A N/A N/A log debug Creating application instance N/A app N/A create_app N/A options debug N/A options secret N/A options gzip N/A N/A N/A log debug Creating IOLoop instance. N/A io_loop N/A N/A IOLoop current N/A N/A N/A io_loop run_sync N/A N/A N/A N/A N/A init_db N/A options database N/A N/A N/A N/A N/A N/A os path exists N/A options cache_dir N/A N/A N/A os path isdir N/A options cache_dir N/A N/A N/A N/A os makedirs N/A options cache_dir N/A N/A Cache CACHE_DIR N/A options cache_dir N/A N/A N/A log info Init thread pool with %d threads N/A options pool_size N/A N/A N/A N/A handlers base BaseHandler THREAD_POOL N/A N/A futures ThreadPoolExecutor N/A options pool_size N/A N/A N/A AsyncHTTPClient configure None max_clients N/A options max_http_clients N/A N/A N/A PYPIClient configure N/A options pypi_server N/A N/A N/A handlers base BaseHandler THREAD_POOL N/A pypi_updater N/A PeriodicCallback N/A PYPIClient packages N/A HOUR 1000 io_loop N/A N/A N/A io_loop add_callback N/A PYPIClient packages N/A N/A N/A io_loop add_callback N/A pypi_updater start N/A N/A N/A log info Starting server http://%s:%d/ N/A options address N/A options port N/A http_server N/A HTTPServer app xheaders N/A options proxy_mode N/A N/A N/A http_server listen N/A options port address N/A options address N/A N/A N/A log debug Setting "%s" as storage N/A options storage N/A N/A N/A PackageFile set_storage N/A options storage N/A N/A N/A log debug Starting main loop N/A N/A N/A io_loop start N/A N/A N/A Exception N/A e N/A N/A N/A N/A log fatal Exception on main loop: N/A N/A N/A log exception e N/A N/A exit 1 N/A N/A N/A exit 0 N/A N/A N/A __name__ __main__ N/A N/A N/A run