README.rst 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. Twisted
  2. #######
  3. |gitter|_
  4. |rtd|_
  5. |pypi|_
  6. |ci|_
  7. For information on changes in this release, see the `NEWS <NEWS.rst>`_ file.
  8. Sponsors
  9. --------
  10. Twisted is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and these awesome sponsors.
  11. If you'd like to join them, please consider `sponsoring Twisted's <https://docs.twisted.org/en/latest/development/sponsorship.html>`_ development.
  12. |thinkst|_
  13. |sftpplus|_
  14. What is this?
  15. -------------
  16. Twisted is a Python event-based framework for internet applications.
  17. It includes modules for many different purposes, including the following:
  18. - ``twisted.web``: HTTP clients and servers, HTML templating, and a WSGI server
  19. - ``twisted.conch``: SSHv2 and Telnet clients and servers and terminal emulators
  20. - ``twisted.words``: Clients and servers for IRC, XMPP, and other IM protocols
  21. - ``twisted.mail``: IMAPv4, POP3, SMTP clients and servers
  22. - ``twisted.positioning``: Tools for communicating with NMEA-compatible GPS receivers
  23. - ``twisted.names``: DNS client and tools for making your own DNS servers
  24. - ``twisted.trial``: A unit testing framework that integrates well with Twisted-based code.
  25. 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).
  26. Third-party reactors can plug into Twisted, and provide support for additional event loops.
  27. Installing
  28. ----------
  29. To install the latest version of Twisted using pip::
  30. $ pip install twisted
  31. Additional instructions for installing this software are in `the installation instructions <https://docs.twisted.org/en/latest/installation.html>`_.
  32. Documentation and Support
  33. -------------------------
  34. Twisted's documentation is available from the `Twisted Matrix Read The Docs website <https://docs.twisted.org/>`_.
  35. This documentation contains how-tos, code examples, and an API reference.
  36. Help is also available on the `Twisted mailing list <https://mail.python.org/mailman3/lists/twisted.python.org/>`_.
  37. There is also an IRC channel, ``#twisted``,
  38. on the `Libera.Chat <https://libera.chat/>`_ network.
  39. A web client is available at `web.libera.chat <https://web.libera.chat/>`_.
  40. Unit Tests
  41. ----------
  42. Twisted has a comprehensive test suite, which can be run by ``tox``::
  43. $ tox -l # to view all test environments
  44. $ tox -e nocov # to run all the tests without coverage
  45. $ tox -e withcov # to run all the tests with coverage
  46. $ tox -e alldeps-withcov-posix # install all dependencies, run tests with coverage on POSIX platform
  47. You can test running the test suite under the different reactors with the ``TWISTED_REACTOR`` environment variable::
  48. $ env TWISTED_REACTOR=epoll tox -e alldeps-withcov-posix
  49. Some of these tests may fail if you:
  50. * don't have the dependencies required for a particular subsystem installed,
  51. * have a firewall blocking some ports (or things like Multicast, which Linux NAT has shown itself to do), or
  52. * run them as root.
  53. Static Code Checkers
  54. --------------------
  55. You can ensure that code complies to Twisted `coding standards <https://docs.twisted.org/en/latest/development/coding-standard.html>`_::
  56. $ tox -e lint # run pre-commit to check coding stanards
  57. $ tox -e mypy # run MyPy static type checker to check for type errors
  58. Or, for speed, use pre-commit directly::
  59. $ pipx run pre-commit run
  60. Copyright
  61. ---------
  62. All of the code in this distribution is Copyright (c) 2001-2024 Twisted Matrix Laboratories.
  63. Twisted is made available under the MIT license.
  64. The included `LICENSE <LICENSE>`_ file describes this in detail.
  65. Warranty
  66. --------
  67. THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
  68. EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  69. OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
  70. TO THE USE OF THIS SOFTWARE IS WITH YOU.
  71. IN NO EVENT WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
  72. AND/OR REDISTRIBUTE THE LIBRARY, BE LIABLE TO YOU FOR ANY DAMAGES, EVEN IF
  73. SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
  74. DAMAGES.
  75. Again, see the included `LICENSE <LICENSE>`_ file for specific legal details.
  76. .. |pypi| image:: https://img.shields.io/pypi/v/twisted.svg
  77. .. _pypi: https://pypi.python.org/pypi/twisted
  78. .. |gitter| image:: https://img.shields.io/gitter/room/twisted/twisted.svg
  79. .. _gitter: https://gitter.im/twisted/twisted
  80. .. |ci| image:: https://github.com/twisted/twisted/actions/workflows/test.yaml/badge.svg
  81. .. _ci: https://github.com/twisted/twisted
  82. .. |rtd| image:: https://readthedocs.org/projects/twisted/badge/?version=latest&style=flat
  83. .. _rtd: https://docs.twistedmatrix.com
  84. .. |thinkst| image:: https://github.com/user-attachments/assets/a5b52432-2d18-4d91-a3c9-772fb2e02781
  85. :alt: Thinkst Canary
  86. .. _thinkst: https://thinkst.com/
  87. .. |sftpplus| image:: https://github.com/user-attachments/assets/5f585316-c7e8-4ef1-8fbb-923f0756ceed
  88. :alt: SFTPPlus
  89. .. _sftpplus: https://www.sftpplus.com/