/ README.rst
README.rst
  1  Introduction
  2  ============
  3  
  4  
  5  .. image:: https://readthedocs.org/projects/adafruit-circuitpython-httpserver/badge/?version=latest
  6      :target: https://docs.circuitpython.org/projects/httpserver/en/latest/
  7      :alt: Documentation Status
  8  
  9  
 10  .. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg
 11      :target: https://adafru.it/discord
 12      :alt: Discord
 13  
 14  
 15  .. image:: https://github.com/adafruit/Adafruit_CircuitPython_HTTPServer/workflows/Build%20CI/badge.svg
 16      :target: https://github.com/adafruit/Adafruit_CircuitPython_HTTPServer/actions
 17      :alt: Build Status
 18  
 19  
 20  .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
 21      :target: https://github.com/psf/black
 22      :alt: Code Style: Black
 23  
 24  Simple HTTP Server for CircuitPython.
 25  
 26  - Supports `socketpool` or `socket` as a source of sockets. Can be used in CPython.
 27  - HTTP 1.1.
 28  - Serves files from a designated root.
 29  - Simple routing available to serve computed results.
 30  
 31  
 32  Dependencies
 33  =============
 34  This driver depends on:
 35  
 36  * `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
 37  
 38  Please ensure all dependencies are available on the CircuitPython filesystem.
 39  This is easily achieved by downloading
 40  `the Adafruit library and driver bundle <https://circuitpython.org/libraries>`_
 41  or individual libraries can be installed using
 42  `circup <https://github.com/adafruit/circup>`_.
 43  
 44  
 45  Installing from PyPI
 46  =====================
 47  On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
 48  PyPI <https://pypi.org/project/adafruit-circuitpython-httpserver/>`_.
 49  To install for current user:
 50  
 51  .. code-block:: shell
 52  
 53      pip3 install adafruit-circuitpython-httpserver
 54  
 55  To install system-wide (this may be required in some cases):
 56  
 57  .. code-block:: shell
 58  
 59      sudo pip3 install adafruit-circuitpython-httpserver
 60  
 61  To install in a virtual environment in your current project:
 62  
 63  .. code-block:: shell
 64  
 65      mkdir project-name && cd project-name
 66      python3 -m venv .venv
 67      source .venv/bin/activate
 68      pip3 install adafruit-circuitpython-httpserver
 69  
 70  
 71  
 72  Installing to a Connected CircuitPython Device with Circup
 73  ==========================================================
 74  
 75  Make sure that you have ``circup`` installed in your Python environment.
 76  Install it with the following command if necessary:
 77  
 78  .. code-block:: shell
 79  
 80      pip3 install circup
 81  
 82  With ``circup`` installed and your CircuitPython device connected use the
 83  following command to install:
 84  
 85  .. code-block:: shell
 86  
 87      circup install adafruit_httpserver
 88  
 89  Or the following command to update an existing version:
 90  
 91  .. code-block:: shell
 92  
 93      circup update
 94  
 95  Contributing
 96  ============
 97  
 98  Contributions are welcome! Please read our `Code of Conduct
 99  <https://github.com/adafruit/Adafruit_CircuitPython_HTTPServer/blob/HEAD/CODE_OF_CONDUCT.md>`_
100  before contributing to help this project stay welcoming.
101  
102  Documentation
103  =============
104  API documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/httpserver/en/latest/>`_.
105  
106  For information on building library documentation, please check out
107  `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.