semvec/pypi-packages huggingface dataset:
pystun-patched-for-raiden 0.1.0
A Python STUN client for getting NAT type and external IP (RFC 3489)
License: MIT
Keywords: STUN NAT

.. image:: https://travis-ci.org/jtriley/pystun.svg?branch=master
    :target: https://travis-ci.org/jtriley/pystun

.. image:: https://coveralls.io/repos/jtriley/pystun/badge.png
   :target: https://coveralls.io/r/jtriley/pystun


PyStun
======
A Python STUN client for getting NAT type and external IP

This is a fork of pystun originally created by gaohawk (http://code.google.com/p/pystun/)

PyStun follows RFC 3489: http://www.ietf.org/rfc/rfc3489.txt

A server following STUN-bis hasn't been found on internet so RFC3489 is the
only implementation.

Installation
------------
To install the latest version::

    $ pip install pystun

or download/clone the source and install manually using::

    $ cd /path/to/pystun/src
    $ python setup.py install

If you're hacking on pystun you should use the 'develop' command instead::

    $ python setup.py develop

This will make a link to the sources inside your site-packages directory so
that any changes are immediately available for testing.

Usage
-----
From command line::

    $ pystun
    NAT Type: Full Cone
    External IP: <your-ip-here>
    External Port: 54320

Pass --help for more options::

    % pystun --help
    usage: pystun [-h] [-d] [-H STUN_HOST] [-P STUN_PORT] [-i SOURCE_IP]
                  [-p SOURCE_PORT] [--version]

    optional arguments:
      -h, --help            show this help message and exit
      -d, --debug           Enable debug logging (default: False)
      -H STUN_HOST, --host STUN_HOST
                            STUN host to use (default: None)
      -P STUN_PORT, --host-port STUN_PORT
                            STUN host port to use (default: 3478)
      -i SOURCE_IP, --interface SOURCE_IP
                            network interface for client (default: 0.0.0.0)
      -p SOURCE_PORT, --port SOURCE_PORT
                            port to listen on for client (default: 54320)
      --version             show program's version number and exit

From Python::

    import stun
    nat_type, external_ip, external_port = stun.get_ip_info()

This will rotate through an internal list of STUN servers until a response is
found. If no response is found you will get "Blocked" as the *nat_type* and
**None** for *external_ip* and *external_port*.

If you prefer to use a specific STUN server::

    nat_type, external_ip, external_port = stun.get_ip_info(stun_host='stun.ekiga.net')

If you prefer to use a specific STUN server port::

    nat_type, external_ip, external_port = stun.get_ip_info(stun_port=3478)

You may also specify the client interface and port that is used although this
is not needed::

    sip = "0.0.0.0" # interface to listen on (all)
    port = 54320 # port to listen on
    nat_type, external_ip, external_port = stun.get_ip_info(sip, port)

Read the code for more details...

LICENSE
-------
MIT
devpi-rss 1.0.9
A plug-in for devpi-server which generates RSS feeds for indices.
License: MIT

=========
devpi-rss
=========

devpi-rss is a plug-in for `devpi-server <http://doc.devpi.net>`_ which generates RSS feeds for
devpi indices.

.. image:: screenshot.png
   :alt: Screenshot
   :target: center

Requirements
------------

.. code::

   devpi-server >= 2.2.2
   devpi-web >= 2.4.0

Installation
------------

.. code::

   pip install devpi-rss

When the devpi-server gets started without a custom theme (without passing the ``--theme``
parameter), then no further configuration is required, since devpi-rss overwrites the
``templates/macro.pt`` of the default theme in order to make the RSS button visible. If you use a
custom theme, then you have to manually apply the content of ``devpi-rss/templates/macro.pt`` into
your theme.

Usage
-----

By default every single index generates its own RSS feed, but an RSS feed can be activated or
deactivated by modifying the regarding index property:

.. code::

   devpi-server index someuser/someindex rss_active=True

or

.. code::

   devpi-server index someuser/someindex rss_active=False

Additional devpi-server commandline options:

.. code::

  --rss-max-items RSS_MAX_ITEMS
                        maximum number of stored feed items [50]
  --rss-truncate-desc   do not let descriptions exceed 32 lines or 1024
                        characters
  --rss-no-auto         do not automatically activate rss for new indices


1.0.9
-----

- fix for python3.4 (thx to kelnmaari)

1.0.8
-----

- fix xml declaration ('utf-8' instead of 'utf8')

1.0.7
-----

- fix callback signature (projectname -> project) (required for recent pluggy version)