{ "info": { "author": "Mohammad Gufran", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Environment :: Web Environment", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP :: WSGI :: Server" ], "description": "# bjoern-cli\n\nbjoern-cli is a command line wrapper to serve a Python WSGI app with [bjoern][] server.\nIt exists because the only way to serve an app with [bjoern][] is to import it in your code and configure the entrypoint to launch the server. This way to serve bjoern ties your application code to a webserver implementation and upgrading or changing the server becomes a change in application code.\n\nWith `bjoern-cli` you can configure your application to expose the WSGI app object and serve it from command line. It also provides a convenient wrappers to selectively use features that are compiled in bjoern and ignore those that aren't.\n\n## Installation\n\nIf you ship your app in a docker container then the recommended way is to install `bjoern-cli` in the container context separate from the application. This makes it easier to upgrade the server or simply swap it out for something inferior.\nAlternatively you can also use it as an app dependency. If that is what you want to do \u2014 and you really shouldn't be doing it like this \u2014 add `bjoern-cli` in your `setup.py` or `requirements.txt` file. If you are using the pathetically slow, pain in the ass tool then put it in `Pipenv` file.\n\n```shell script\npip install bjoern-cli\n```\n\n\n## Usage\n\nAssuming that your application `api` is exposed by module `my_app.web`, you can start the server with\n\n```shell script\nbjoern-cli --module my_app.web --app api\n```\n\nFollowing command line parameters are available:\n\n```\n --host host Host name or the IP address to bind with (default: 0.0.0.0)\n --port port Port number to bind with (default: 8787)\n --module module Importable python module that exposes the WSGI app (default: None)\n --app app Name of the app as exposed by the module (default: app)\n --statsd-enable Expose metrics to statsd (default: False)\n --statsd-host host Address of the Statsd collector (default: 127.0.0.1)\n --statsd-port port Port of the Statsd collector (default: 8125)\n --statsd-ns namespace Statsd metrics namespace (default: bjoern)\n --statsd-tags tags Comma separated list of tags to expose with metrics (default: [])\n```\n\nFeatures than can be selectively compiled into bjoern are appropriately indicated in the argument description. If a feature is not available its parameter description is followed by `\"Ignored since bjoern is not compiled with this feature\"`.\n\n## Caveat\n\nNote that bjoern-cli fetches bjoern from github instead of PyPI. This is necessary at this time because the version of bjoern with Statsd support is not tagged and pulling from github remains the only way to install it.\nThis also means that bjoern will be compiled when you install `bjoern-cli` and you are expected to setup proper feature flags in the installation environment.\nIf you are installing bjoern-cli in a docker container then adding the following snippet to the Dockerfile should enable statsd and tags support.\n\n```dockerfile\nENV BJOERN_WANT_STATSD=true BJOERN_WANT_STATSD_TAGS=true\n```\n\nIf you are in a shell then simply run\n\n```shell script\nBJOERN_WANT_STATSD=true BJOERN_WANT_STATSD_TAGS=true pip install bjoern-cli\n```\n\nYou can consult [setup.py][] to know the version of bjoern that will be installed.\n\n\n[bjoern]: https://github.com/jonashaag/bjoern\n[setup.py]: ./setup.py", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Gufran/bjoern-cli", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "bjoern-cli", "package_url": "https://pypi.org/project/bjoern-cli/", "platform": "", "project_url": "https://pypi.org/project/bjoern-cli/", "project_urls": { "Homepage": "https://github.com/Gufran/bjoern-cli" }, "release_url": "https://pypi.org/project/bjoern-cli/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "A convenient command line wrapper around bjoern web server", "version": "0.0.1" }, "last_serial": 5955502, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "354854ed1fb0ffddcbed6452f87d42b5", "sha256": "381766b4f69cdc63cfe31c02b3f19d8b926363f2a43063f77aa5e5a36528240e" }, "downloads": -1, "filename": "bjoern-cli-0.0.1.tar.gz", "has_sig": false, "md5_digest": "354854ed1fb0ffddcbed6452f87d42b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3680, "upload_time": "2019-10-10T15:26:00", "url": "https://files.pythonhosted.org/packages/11/59/f47782a78eb5b8dabefdb62bce02bfdf188eb1f6545c507442c02a602a84/bjoern-cli-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "354854ed1fb0ffddcbed6452f87d42b5", "sha256": "381766b4f69cdc63cfe31c02b3f19d8b926363f2a43063f77aa5e5a36528240e" }, "downloads": -1, "filename": "bjoern-cli-0.0.1.tar.gz", "has_sig": false, "md5_digest": "354854ed1fb0ffddcbed6452f87d42b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3680, "upload_time": "2019-10-10T15:26:00", "url": "https://files.pythonhosted.org/packages/11/59/f47782a78eb5b8dabefdb62bce02bfdf188eb1f6545c507442c02a602a84/bjoern-cli-0.0.1.tar.gz" } ] }