diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 20c6e50..0000000 --- a/.coveragerc +++ /dev/null @@ -1,3 +0,0 @@ -[report] -include = hug_website/*.py -exclude_lines = if __name__ == .__main__.: diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index b41370f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,10 +0,0 @@ -root = true - -[*.py] -max_line_length = 120 -indent_style = space -indent_size = 4 -ignore_frosted_errors = E103 -skip = runtests.py,build -balanced_wrapping = true -not_skip = __init__.py diff --git a/.env b/.env deleted file mode 100644 index 3069715..0000000 --- a/.env +++ /dev/null @@ -1,179 +0,0 @@ -#!/bin/bash -OPEN_PROJECT_NAME="hug_website" - -if [ "$PROJECT_NAME" = "$OPEN_PROJECT_NAME" ]; then - return -fi - -if [ ! -f ".env" ]; then - return -fi - -export PROJECT_NAME=$OPEN_PROJECT_NAME -export PROJECT_DIR="$PWD" - -if [ ! -d "venv" ]; then - if ! hash pyvenv 2>/dev/null; then - function pyvenv() - { - if hash pyvenv-3.5 2>/dev/null; then - pyvenv-3.5 $@ - fi - if hash pyvenv-3.4 2>/dev/null; then - pyvenv-3.4 $@ - fi - if hash pyvenv-3.3 2>/dev/null; then - pyvenv-3.3 $@ - fi - if hash pyvenv-3.2 2>/dev/null; then - pyvenv-3.2 $@ - fi - } - fi - - echo "Making venv for $PROJECT_NAME" - pyvenv venv - . venv/bin/activate - pip install -r requirements/development.txt - python setup.py install -fi - -. venv/bin/activate - -# Let's make sure this is a hubflow enabled repo -yes | git hf init >/dev/null 2>/dev/null - -# Quick directory switching -alias root="cd $PROJECT_DIR" -alias project="root; cd $PROJECT_NAME" -alias tests="root; cd tests" -alias requirements="root; cd requirements" -alias test="_test" - - -function open { - (root - $CODE_EDITOR $PROJECT_NAME/*.py setup.py tests/*.py README.md tox.ini .gitignore CHANGELOG.md setup.cfg .editorconfig .env .coveragerc .travis.yml) -} - - -function clean { - (root - isort $PROJECT_NAME/*.py setup.py tests/*.py) -} - - -function check { - (root - frosted $PROJECT_NAME/*.py) -} - - -function _test { - (root - tox) -} - - -function coverage { - (root - $BROWSER htmlcov/index.html) -} - - -function load { - (root - python setup.py install) -} - - -function unload { - (root - pip uninstall $PROJECT_NAME) -} - - -function install { - (root - sudo python setup.py install) -} - - -function run { - (root - load - pull_latest - compile - hug -m hug_website.app) -} - -function update { - (root - pip install -r requirements/development.txt -U) -} - - -function static() -{ - project - cd static -} - - -function compile() -{ - (static - compass compile - cd jiphy - jiphy *.py -od ../scripts/) -} - -function pull_latest() -{ - (project - wget -qO- https://raw.githubusercontent.com/timothycrosley/hug/develop/CONTRIBUTING.md | markdown_py -x codehilite > views/contribute.html - wget -qO- https://raw.githubusercontent.com/timothycrosley/hug/develop/ARCHITECTURE.md | markdown_py -x codehilite > views/architecture.html - wget -qO- https://raw.githubusercontent.com/timothycrosley/hug/develop/EXTENDING.md | markdown_py -x codehilite > views/extending.html - wget -qO- https://raw.githubusercontent.com/timothycrosley/hug/develop/documentation/ROUTING.md | markdown_py -x codehilite > views/routing.html - wget -qO- https://raw.githubusercontent.com/timothycrosley/hug/develop/documentation/TYPE_ANNOTATIONS.md | markdown_py -x codehilite > views/type_annotation.html - wget -qO- https://raw.githubusercontent.com/timothycrosley/hug/develop/documentation/DIRECTIVES.md | markdown_py -x codehilite > views/directives.html - wget -qO- https://raw.githubusercontent.com/timothycrosley/hug/develop/documentation/OUTPUT_FORMATS.md | markdown_py -x codehilite > views/output_formats.html) -} - -function distribute { - (root - python setup.py sdist upload) -} - - -function leave { - export PROJECT_NAME="" - export PROJECT_DIR="" - - unalias root - unalias project - unalias tests - unalias requirements - unalias test - - unset -f _start - unset -f _end - - - unset -f open - unset -f clean - unset -f _test - unset -f coverage - unset -f load - unset -f unload - unset -f install - unset -f run - unset -f update - unset -f distribute - unset -f static - unset -f compile - - unset -f leave - - deactivate -} diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b92a413..0000000 --- a/.gitignore +++ /dev/null @@ -1,75 +0,0 @@ -*.py[cod] -.DS_Store -# C extensions -*.so - -# Packages -*.egg -*.egg-info -build -eggs -parts -var -sdist -develop-eggs -.installed.cfg -lib -lib64 -MANIFEST - -# Installer logs -pip-log.txt -npm-debug.log -pip-selfcheck.json - -# Unit test / coverage reports -.coverage -.tox -nosetests.xml -htmlcov -.cache - -# Translations -*.mo - -# Mr Developer -.mr.developer.cfg -.project -.pydevproject - -# SQLite -test_exp_framework - -# npm -node_modules/ - -# dolphin -.directory -libpeerconnection.log - -# setuptools -dist - -# IDE Files -atlassian-ide-plugin.xml -.idea/ -*.swp -*.kate-swp -.ropeproject/ - -# Python3 Venv Files -.venv/ -bin/ -include/ -lib/ -lib64 -pyvenv.cfg -share/ -venv/ - -# Cython -*.c - -# Static compiled -hug_website/static/scripts/main.js -hug_website/static/.sass-cache/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 688cf23..0000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: python -python: - - "3.3" - - "3.4" - - "3.5" -install: - - pip install tox tox-travis coveralls -script: tox -after_success: coveralls diff --git a/404.html b/404.html new file mode 100644 index 0000000..6a5e433 --- /dev/null +++ b/404.html @@ -0,0 +1 @@ +
Python makes it easy to document your APIs well using doc strings and types annotations. hug uses this information to automatically generate documentation for users of your API so you don't have to.
hug leverages Python 3 type annotations to enable simple per argument validation and transformation. This leads to explicit and easy to follow endpoints.
With hug your API and business logic is cleanly separated from the interface you're exposing it on, which means you can safely expose it over HTTP, CLI, and Python in one fell swoop.
Start writing world class APIs on top of Python 3 in no time. Use hug 2.4.8 to radically simplify your code base.
Get started now >