{
"info": {
"author": "Chris Haumesser",
"author_email": "chris.haumesser@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Environment :: Web Environment",
"Framework :: Django :: 2.1",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: POSIX",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Internet",
"Topic :: Internet :: WWW/HTTP"
],
"description": "####\nburl\n####\n\n``burl`` (brief url) is a URL shortener written in Django. It has a simple REST\nAPI, allowing it to integrate seamlessly as a microservice in many\napplication architectures.\n\n\nImplementation\n==============\n\n``burl`` implements a URL shortening service by allowing authenticated users\nto create a brief URL pointing to any other URL. When creating a brief URL,\nthe user may specify the brief url, which must be globally unique, or the\nsystem will generate a random one. When the brief URL is requested from\n``burl``, it returns a redirect to the original URL.\n\nThere are two primary interfaces to burl:\n\n#. the built-in django admin at ``/admin``;\n#. a minimal restful API based on django rest framework (see ``/api/v1/swagger``).\n\nNew brief URLs can only be created by authenticated users (via session auth\nor token auth).\n\n``burl`` uses `hashids `_ for automatically generated\nbrief URLs. Each auto-generated BURL is created using a random salt and a\nrandom number passed into the hashids library. This value is then stored in the\ndatabase. The random BURLs generated in this manner should be sufficiently\ndifficult to reverse engineer.\n\n\nRequirements\n============\n\ncode\n----\n\n``burl`` requires python 3.6 or newer. Python 2 is not supported.\n\n``burl`` should run anywhere python will run, most easily on a unix-like system.\n\n\ndatabase\n--------\n\n``burl`` requires a postgresql 9.4+ database.\n\nYou will need a C compiler, python header files, and postgres development\nlibraries on your system to build the postgres ``psycopg2`` module needed\nfor postgresql.\n\n\nInstallation\n============\n\n``burl`` is made to be installed via the standard python installation methods.\nYou can install it as simply as running::\n\n pip install burl\n\nIt is recommended, however, that you install ``burl`` in a virtualenv or\nDocker container. For development, in particular, the easiest way to set\neverything up is to use ``pipenv`` (see below).\n\nOnce you have installed ``burl``, you will need to create a database for its\nuse. The default configuration expects a database called ``burl``, owned by\na user named ``burl``, with a password specified in the environment variable\n``$BURL_POSTGRES_PASSWORD``. You can alter these settings by overriding\nthe django ``DATABASES`` configuration dictionary in your ``burlrc`` (see\nbelow).\n\nOnce your database is configured, run the database migrations to create\nthe tables::\n\n burl-manager migrate\n\nThen create a new superuser::\n\n burl-manager createsuperuser\n\nNow you should be ready to run ``burl``! You can run a test/development server\nby running ``burl-manager runserver`` to ensure that everything is working. In\nproduction, you should deploy behind a WSGI server.\n\nConfiguration\n=============\n\n``burl`` adds two extra layers of configuration on top of the default Django\nsettings mechanism.\n\nConfiguration Notes\n-------------------\n\nEmail\n~~~~~\n\nIf you want working email (e.g. for password resets) the only supported option\nat this time is to use sendgrid. Set the environment variable\n``BURL_SENDGRID_API_KEY`` to enable sendgrid support. Otherwise all email is\nprinted to the console and never sent.\n\nEnvironment Variables\n---------------------\n\nRequired Environment Variables\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nPer the 12-factor app, secrets are read from environment variables. The following\nenvironment variables must be set::\n\n BURL_SECRET_KEY=\"***********************************************\"\n BURL_POSTGRES_PASSWORD=\"***********\"\n\nThere are a variety of ways you can set these variables, using your system's\ninit system, or your organization's infrastructure secrets management tools.\n\nFailing to set these variables will raise an ``ImproperlyConfigured`` exception.\n\nOptional Environment Variables\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nShown here with default values::\n\n BURL_API_PAGE_SIZE=100\n BURL_APP_LOG_LEVEL=INFO\n BURL_HASHID_ALPHABET=abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ0123456789\n BURL_LOG_LEVEL=WARNING\n BURL_MEDIA_ROOT=$HOME/var/burl/media\n BURL_POSTGRES_DB=burl\n BURL_POSTGRES_HOST=127.0.0.1\n BURL_POSTGRES_PORT=5432\n BURL_POSTGRES_USER=burl\n BURL_SENDGRID_API_KEY=''\n BURL_STATIC_ROOT=$HOME/share/burl/static\n BURL_TIMEZONE=America/Los_Angeles\n\nConfiguration File\n------------------\n\n``burl`` is also configurable via an external configuration file; it will try\neach of the following paths in order, and will use the first file it finds:\n\n#. ``/etc/burl/burlrc``\n#. ``$HOME/.config/burl/burlrc``\n#. ``$HOME/etc/burl/burlrc``\n\nThe ``burlrc`` file is loaded as a python module, after all other django settings\nare loaded. Settings configured in ``burlrc`` will override previously-defined\nsettings. ``burlrc`` can contain arbitrary python code, just like any Django settings\nmodule; and just like Django settings modules, only variables in ALL_CAPS are\nloaded.\n\n\nDeployment\n==========\n\nStandard Python\n---------------\n\n``burl`` is a straightforward django app, with nothing fancy.\n\nYou can deploy burl with any WSGI-compliant web server. Running\n`gunicorn `_ as the backend WSGI server, with an nginx\nreverse proxy in front of it, is a common and well-supported configuration.\n\n`Deploying Django `_\nhas some generic information about deploying django applications that you may\nfind useful if you are new to this stack.\n\nDocker\n------\n\nThe included Dockerfile builds a container that bundles burl with gunicorn and\nexposes gunicorn on port 8000. It builds with uid ``65432`` by default, which\nyou can change on the ``docker build`` command line, e.g.::\n\n docker build --build-arg uid=23456 -t burl .\n\nThis container does not include postgres or nginx. You will need postgres to run\nburl, and you will want to put nginx in front of the container.\n\nOnce you have a built container, it can be activated as follows::\n\n docker run -dit -p 8000:8000 --env-file /etc/burl/env --add-host=dbhost:10.0.0.10 \\\n --restart unless-stopped burl:latest burl\n\n\nDevelopment\n===========\n\n``burl`` uses a modern python toolchain, consisting of:\n\n- `pipenv `_ for managing dependencies,\n- `pbr `_ build system,\n- docker support,\n- semantic version numbers,\n- git flow branching scheme.\n\nTo start coding, first install ``pipenv``, then clone this repo and run\n``pipenv install -d``. This will set up a virtualenv, install all of\nthe dependencies, and install burl in editable mode. You should now be\nable to run commands like ``pipenv shell``, ``pipenv run burl-manager test``,\netc.\n\nWhen using ``pipenv`` you can make use of a ``.env`` file in the source root,\nand set the requisite environment variables (above) there. This file is\nignored in ``.gitignore`` and local to your environment.\n\n*See:*\n\n- `Why Python devs should use Pipenv `_\n\nTests\n-----\n\n``burl`` was not developed using TDD, but has reasonable test coverage.\nTests are located in the standard places for django applications. New PRs\nshould include relevant tests whenever possible.\n\n\n\n",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/wryfi/burl",
"keywords": "",
"license": "",
"maintainer": "",
"maintainer_email": "",
"name": "burl",
"package_url": "https://pypi.org/project/burl/",
"platform": "",
"project_url": "https://pypi.org/project/burl/",
"project_urls": {
"Homepage": "https://github.com/wryfi/burl"
},
"release_url": "https://pypi.org/project/burl/1.0.0/",
"requires_dist": [
"certifi (==2018.11.29)",
"chardet (==3.0.4)",
"coreapi (==2.3.3)",
"coreschema (==0.0.4)",
"django-cors-headers (==2.4.0)",
"django-rest-framework (==0.1.0)",
"django-rest-swagger (==2.1.2)",
"django-sendgrid-v5 (==0.7.1)",
"django (==2.1.7)",
"djangorestframework (==3.9.1)",
"future (==0.17.1)",
"gunicorn (==19.9.0)",
"hashids (==1.2.0)",
"idna (==2.8)",
"itypes (==1.1.0)",
"jinja2 (==2.10)",
"markupsafe (==1.1.1)",
"openapi-codec (==1.3.2)",
"psycopg2 (==2.7.7)",
"python-http-client (==3.1.0)",
"pytz (==2018.9)",
"requests (==2.21.0)",
"sendgrid (==5.6.0)",
"simplejson (==3.16.0)",
"uritemplate (==3.0.0)",
"urllib3 (==1.24.1)",
"whitenoise (==4.1.2)"
],
"requires_python": "",
"summary": "a url shortening django app",
"version": "1.0.0"
},
"last_serial": 4859964,
"releases": {
"1.0.0": [
{
"comment_text": "",
"digests": {
"md5": "7c59423b1cca938be66cb94ecb390820",
"sha256": "3c3540d316a7825f6fe4c8ba234720a1640d95258f9210c54aad57ba7aff12d9"
},
"downloads": -1,
"filename": "burl-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7c59423b1cca938be66cb94ecb390820",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 31638,
"upload_time": "2019-02-24T04:12:17",
"url": "https://files.pythonhosted.org/packages/af/af/20aedd400b98c8f5d1f7920548cf9bb442732c04db6e7915a9c4176c0298/burl-1.0.0-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "2b9298c45b17c5e9647531f6ff1468b0",
"sha256": "82f8fb051c9b6a95bb724e522effad86b14394f33135bef1ccd2841f2e992368"
},
"downloads": -1,
"filename": "burl-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "2b9298c45b17c5e9647531f6ff1468b0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 35074,
"upload_time": "2019-02-24T04:12:19",
"url": "https://files.pythonhosted.org/packages/ba/07/0dcf5eb8411330c72a01f90a4b49c2274f8d9adbd52fa9d1d1d51bdf3f44/burl-1.0.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "7c59423b1cca938be66cb94ecb390820",
"sha256": "3c3540d316a7825f6fe4c8ba234720a1640d95258f9210c54aad57ba7aff12d9"
},
"downloads": -1,
"filename": "burl-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7c59423b1cca938be66cb94ecb390820",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 31638,
"upload_time": "2019-02-24T04:12:17",
"url": "https://files.pythonhosted.org/packages/af/af/20aedd400b98c8f5d1f7920548cf9bb442732c04db6e7915a9c4176c0298/burl-1.0.0-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "2b9298c45b17c5e9647531f6ff1468b0",
"sha256": "82f8fb051c9b6a95bb724e522effad86b14394f33135bef1ccd2841f2e992368"
},
"downloads": -1,
"filename": "burl-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "2b9298c45b17c5e9647531f6ff1468b0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 35074,
"upload_time": "2019-02-24T04:12:19",
"url": "https://files.pythonhosted.org/packages/ba/07/0dcf5eb8411330c72a01f90a4b49c2274f8d9adbd52fa9d1d1d51bdf3f44/burl-1.0.0.tar.gz"
}
]
}