README.rst 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. Twisted
  2. =======
  3. |pypi|_
  4. |travis|_
  5. |circleci|_
  6. For information on changes in this release, see the `NEWS <NEWS.rst>`_ file.
  7. What is this?
  8. -------------
  9. Twisted is an event-based framework for internet applications, supporting Python 2.7 and Python 3.5+.
  10. It includes modules for many different purposes, including the following:
  11. - ``twisted.web``: HTTP clients and servers, HTML templating, and a WSGI server
  12. - ``twisted.conch``: SSHv2 and Telnet clients and servers and terminal emulators
  13. - ``twisted.words``: Clients and servers for IRC, XMPP, and other IM protocols
  14. - ``twisted.mail``: IMAPv4, POP3, SMTP clients and servers
  15. - ``twisted.positioning``: Tools for communicating with NMEA-compatible GPS receivers
  16. - ``twisted.names``: DNS client and tools for making your own DNS servers
  17. - ``twisted.trial``: A unit testing framework that integrates well with Twisted-based code.
  18. Twisted supports all major system event loops -- ``select`` (all platforms), ``poll`` (most POSIX platforms), ``epoll`` (Linux), ``kqueue`` (FreeBSD, macOS), IOCP (Windows), and various GUI event loops (GTK+2/3, Qt, wxWidgets).
  19. Third-party reactors can plug into Twisted, and provide support for additional event loops.
  20. Installing
  21. ----------
  22. To install the latest version of Twisted using pip::
  23. $ pip install twisted
  24. Additional instructions for installing this software are in `the installation instructions <INSTALL.rst>`_.
  25. Documentation and Support
  26. -------------------------
  27. Twisted's documentation is available from the `Twisted Matrix website <https://twistedmatrix.com/documents/current/>`_.
  28. This documentation contains how-tos, code examples, and an API reference.
  29. Help is also available on the `Twisted mailing list <https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python>`_.
  30. There is also a pair of very lively IRC channels, ``#twisted`` (for general Twisted questions) and ``#twisted.web`` (for Twisted Web), on ``chat.freenode.net``.
  31. Unit Tests
  32. ----------
  33. Twisted has a comprehensive test suite, which can be run by ``tox``::
  34. $ tox -l # to view all test environments
  35. $ tox -e py27-tests # to run the tests for Python 2.7
  36. $ tox -e py35-tests # to run the tests for Python 3.5
  37. You can test running the test suite under the different reactors with the ``TWISTED_REACTOR`` environment variable::
  38. $ env TWISTED_REACTOR=epoll tox -e py27-tests
  39. Some of these tests may fail if you:
  40. * don't have the dependencies required for a particular subsystem installed,
  41. * have a firewall blocking some ports (or things like Multicast, which Linux NAT has shown itself to do), or
  42. * run them as root.
  43. Copyright
  44. ---------
  45. All of the code in this distribution is Copyright (c) 2001-2020 Twisted Matrix Laboratories.
  46. Twisted is made available under the MIT license.
  47. The included `LICENSE <LICENSE>`_ file describes this in detail.
  48. Warranty
  49. --------
  50. THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
  51. EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  52. OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
  53. TO THE USE OF THIS SOFTWARE IS WITH YOU.
  54. IN NO EVENT WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
  55. AND/OR REDISTRIBUTE THE LIBRARY, BE LIABLE TO YOU FOR ANY DAMAGES, EVEN IF
  56. SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
  57. DAMAGES.
  58. Again, see the included `LICENSE <LICENSE>`_ file for specific legal details.
  59. .. |pypi| image:: http://img.shields.io/pypi/v/twisted.svg
  60. .. _pypi: https://pypi.python.org/pypi/twisted
  61. .. |travis| image:: https://travis-ci.org/twisted/twisted.svg?branch=trunk
  62. .. _travis: https://travis-ci.org/twisted/twisted
  63. .. |circleci| image:: https://circleci.com/gh/twisted/twisted.svg?style=svg
  64. .. _circleci: https://circleci.com/gh/twisted/twisted