Skip to content

Commit

Permalink
prepare 0.7.2; add additional checkers
Browse files Browse the repository at this point in the history
  • Loading branch information
barseghyanartur committed Jan 3, 2016
1 parent 163a641 commit d132c31
Show file tree
Hide file tree
Showing 36 changed files with 134 additions and 359 deletions.
19 changes: 13 additions & 6 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
Changelog
==================================
=========
0.7.2
-----
2016-01-03

- Added additional checkers.

0.7.1
----------------------------------
-----
2014-10-09

- Added `argparse` to requirements.

0.7
----------------------------------
---
2014-05-09

- Added command line tools.
- The ``print_info`` argument of the ``pif.utils.get_public_ip`` function is replaced with ``verbose``.
- The ``print_info`` argument of the ``pif.utils.get_public_ip`` function is
replaced with ``verbose``.
- The ``requests`` library is used instead of standard urlopen.

0.6
----------------------------------
---
2014-01-20

- Lowered `six` requirement to 1.1.0.
- Fixes to whatsmyip checker (caused by changed whatsmyip api).

0.5
----------------------------------
---
2013-09-06

- Python 3 support
13 changes: 13 additions & 0 deletions CREDITS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Credits
=======
Authors
-------
- `Artur Barseghyan <https://github.com/barseghyanartur/>`_.

Contributors
------------
Thanks to the following people for their contributions:

- `Bruno Santeramo
<https://github.com/barseghyanartur/django-fobi/commits/master?author=Bruno Santeramo>`_
for additional checkers.
2 changes: 1 addition & 1 deletion LICENSE_GPL2.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

pif - Public IP address checker.
Copyright (C) 2013 Artur Barseghyan
Copyright (C) 2013-2016 Artur Barseghyan

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion LICENSE_LGPL_2.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.

pif - Public IP address checker.
Copyright (C) 2013 Artur Barseghyan
Copyright (C) 2013-2016 Artur Barseghyan

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
Expand Down
58 changes: 30 additions & 28 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
==================================
===
pif
==================================
===
Discovers your public IP address using pre-defined checkers (external services).

Installation
==================================
============
Install with latest stable version from PyPI

.. code-block:: none
.. code-block:: sh
$ pip install pif
pip install pif
or install the latest stable version from source

.. code-block:: none
.. code-block:: sh
$ pip install -e hg+https://bitbucket.org/barseghyanartur/pif@stable#egg=pif
pip install -e hg+https://bitbucket.org/barseghyanartur/pif@stable#egg=pif
or install into python path

.. code-block:: none
.. code-block:: sh
$ python setup.py install
python setup.py install
That's all. See the `Usage and examples` section for more.

Usage and examples
==================================
==================
Basic usage
----------------------------------
-----------
Get public IP

.. code-block:: python
Expand All @@ -50,9 +50,9 @@ List available checkers
list_checkers()
Registering a custom IP checker
----------------------------------
`pif` ships with a number of pre-defined public IP checkers. But you may extend it by defining your own ones as
follows.
-------------------------------
`pif` ships with a number of pre-defined public IP checkers. But you may extend
it by defining your own ones as follows.

.. code-block:: python
Expand All @@ -62,18 +62,20 @@ follows.
uid = 'mypublicipchecker' # UID of the checker
def get_public_ip(self):
# Implement your logic
# TODO: Implement your logic
registry.register(MyPublicIPChecker) # Register the checker
# Register the checker
registry.register(MyPublicIPChecker)
get_public_ip('mypublicipchecker') # Get public IP using the preferred checker
# Get public IP using the preferred checker
get_public_ip('mypublicipchecker')
Command line usage
----------------------------------
It's possible to get your public IP address from command line using the `pif.commands.get_public_ip`
module.
------------------
It's possible to get your public IP address from command line using the
`pif.commands.get_public_ip` module.

.. code-block:: none
.. code-block:: text
optional arguments:
-h, --help show this help message and exit
Expand All @@ -84,24 +86,24 @@ module.
:Example: (simple)

.. code-block:: none
.. code-block:: sh
$ get-public-ip
get-public-ip
:Example: (with preferred checked and verbose output)

.. code-block:: none
.. code-block:: sh
$ get-public-ip -c whatismyip.com -v 1
get-public-ip -c whatismyip.com -v 1
License
==================================
=======
GPL 2.0/LGPL 2.1

Support
==================================
=======
For any issues contact me at the e-mail given in the `Author` section.

Author
==================================
======
Artur Barseghyan <artur.barseghyan@gmail.com>
114 changes: 0 additions & 114 deletions docs/index.rst

This file was deleted.

11 changes: 0 additions & 11 deletions docs/pif.checkers.dyndns.rst

This file was deleted.

11 changes: 0 additions & 11 deletions docs/pif.checkers.ident.rst

This file was deleted.

12 changes: 0 additions & 12 deletions docs/pif.checkers.rst

This file was deleted.

11 changes: 0 additions & 11 deletions docs/pif.checkers.whatismyip.rst

This file was deleted.

11 changes: 0 additions & 11 deletions docs/pif.commands.rst

This file was deleted.

0 comments on commit d132c31

Please sign in to comment.