pv8 / noipy Goto Github PK
View Code? Open in Web Editor NEWCommand line tool to update DDNS: No-IP, DuckDNS and DynDNS hosts IP
License: Apache License 2.0
Command line tool to update DDNS: No-IP, DuckDNS and DynDNS hosts IP
License: Apache License 2.0
Similar code found in 1 other location (mass = 49):
if not os.path.exists(config_location):
print("Creating custom config directory [%s]... "
% config_location, end="")
os.mkdir(config_location)
print("OK.")
if not os.path.exists(config_dir):
print("Creating directory [%s]... " % config_dir, end="")
os.mkdir(config_dir)
print("OK.")
https://codeclimate.com/github/pv8/noipy/noipy/authinfo.py#issue_5730a7f49e33d10001076de8
Cyclomatic complexity is too high in function execute_update. (21)
def execute_update(args):
"""Execute the update based on command line args and returns a dictionary
with 'execution result, ''response code', 'response info' and
'process friendly message'.
"""
(...)
https://codeclimate.com/github/pv8/noipy/noipy/main.py#issue_5730a7f72cf9fb00010770f2
Create a feature to avoid sending a new request to the DDNS provider if the machine external IP haven't changed since the last update. This is useful when noipy is scheduled to run periodically via crontab
.
Provide support for DynDns Update API.
PEP-8 code.
Because virtualenv has dropped support for Python 3.2 on version 14.0.0, noipy building has been falling:
Traceback (most recent call last):
File "<stdin>", line 7, in <module>
File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/virtualenv_support/pip-8.1.1-py2.py3-none-any.whl/pip/__init__.py", line 16, in <module>
File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/virtualenv_support/pip-8.1.1-py2.py3-none-any.whl/pip/vcs/mercurial.py", line 9, in <module>
File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/virtualenv_support/pip-8.1.1-py2.py3-none-any.whl/pip/download.py", line 36, in <module>
File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/virtualenv_support/pip-8.1.1-py2.py3-none-any.whl/pip/utils/ui.py", line 15, in <module>
py2.py3-none-any.whl/pip/_vendor/progress/bar.py", line 48
empty_fill = u'โ'
^
SyntaxError: invalid syntax
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/virtualenv.py", line 2316, in <module>
main()
File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/virtualenv.py", line 708, in main
symlink=options.symlink)
File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/virtualenv.py", line 941, in create_environment
download=download,
File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/virtualenv.py", line 897, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/virtualenv.py", line 792, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home/travis/build/p...x/py32/bin/python3.2 - setuptools pip wheel failed with error code 1
Running virtualenv with interpreter /opt/python/3.2.5/bin/python3.2
ERROR: InvocationError: /home/travis/virtualenv/python2.7.9/bin/python -m virtualenv --python /opt/python/3.2.5/bin/python3.2 py32 (see /home/travis/build/pv8/noipy/.tox/py32/log/py32-0.log)
___________________________________ summary ____________________________________
ERROR: py32: InvocationError: /home/travis/virtualenv/python2.7.9/bin/python -m virtualenv --python /opt/python/3.2.5/bin/python3.2 py32 (see /home/travis/build/pv8/noipy/.tox/py32/log/py32-0.log)
The command "tox -e $TOXENV" exited with 1.
store build cache
0.00s
10.77schange detected:
(dev).tmpl
/home/travis/build/pv8/noipy/.tox/dist/noipy-1.4.4.zip
/home/travis/build/pv8/noipy/.tox/log/tox-0.log
/home/travis/build/pv8/noipy/.tox/py27/bin/activate
/home/travis/build/pv8/noipy/.tox/py27/bin/activate.csh
/home/travis/build/pv8/noipy/.tox/py27/bin/activate.fish
/home/travis/build/pv8/noipy/.tox/py27/bin/activate_this.py
/home/travis/build/pv8/noipy/.tox/py27/bin/coverage
/home/travis/build/pv8/noipy/.tox/py27/bin/coverage2
/home/travis/build/pv8/noipy/.tox/py27/bin/coverage-2.7
/home/travis/build/pv8/noipy/.tox/py27/bin/easy_install
/home/travis/build/pv8/noipy/.tox/py27/bin/easy_install-2.7
/home/travis/build/pv8/noipy/.tox/py27/bin/noipy
/home/travis/build/pv8/noipy/.tox/py27/bin/pip
/home/travis/build/pv8/noipy/.tox/py27/bin/pip2
/home/travis/build/pv8/noipy/.tox/py27/bin/pip2.7
/home/travis/build/pv8/noipy/.tox/py27/bin/python
/home/travis/build/pv8/noipy/.tox/py27/bin/python2
/home/travis/build/pv8/noipy/.tox/py27/bin/python2.7
/home/travis/build/pv8/noipy/.tox/py2
...
changes detected, packing new archive
.
uploading archive
Done. Your build exited with 1.
Workaround it or drop support to Python 3.2 as well?
Hey, I think some people might found this useful:
Description=noip service
After=network.target
After=syslog.target
[Install]
WantedBy=multi-user.target
[Service]
ExecStart=noipy --provider noip --hostname <hostname>
Restart=always
Type=forking
You need to use --store
as root, otherwise the service will fail to start.
Will it support vpn connection? And also, if connection change from HK (IP 1.1.1.1) to USA (IP 2.2.2.2), I think it must have checker/updater feature too.
Does this script update IPv6 ?
Used to work well, I'm not sure what broke it.
OS: Raspbian GNU/Linux 10 (buster)
HW: Raspberry 4
Command line:
/usr/local/bin/noipy -u xxxxxx -p xxxxxx -n xxxxxx.ddns.net --provider noip
Result:
== noipy DDNS updater tool v1.5.2 ==
Traceback (most recent call last):
File "/usr/local/bin/noipy", line 10, in
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/noipy/main.py", line 168, in main
result = execute_update(args)
File "/usr/local/lib/python2.7/dist-packages/noipy/main.py", line 111, in execute_update
ip_address = args.ip if args.ip else utils.get_ip()
File "/usr/local/lib/python2.7/dist-packages/noipy/utils.py", line 29, in get_ip
ip, _ = r.json()['origin'].split(',')
ValueError: need more than 1 value to unpack
Error when executing from command line passing username
argument:
$ noipy -u <user> -p <password> -n <hostname> --provider <provider>
Error message:
AttributeError: 'Namespace' object has no attribute 'username'
Implement a feature to generate the properties file via command line in order to make the usage of the tool even easier.
Make noipy availible on Python Package Index so that it't possible to install via pip install:
$ pip install noipy
Implement IPv6 support for DuckDNS provider.
Cyclomatic complexity is too high in method status_message. (6)
@property
def status_message(self):
"""Return friendly response from API based on response code. """
(...)
https://codeclimate.com/github/pv8/noipy/noipy/dnsupdater.py#issue_5730a7f77f42de0001077136
Remove plugins from the project so they can be installed and loaded separately from noipy - i.e. Flask extensions structure.
Currently, plugins are specified inside dnsupdater.py file:
Lines 15 to 24 in 0fbacd9
Important: A good documentation on how to implement plugins need to be part of this improvement.
Use Click to improve command line (:question:)
Containerize noipy so it is possible to isolate the environment where the tool runs.
Hi ๐
This is my first visit to this fine repo, but it seems you have been working hard to keep all dependencies updated so far.
Once you have closed this issue, I'll create seperate pull requests for every update as soon as I find one.
That's it for now!
Happy merging! ๐ค
Provide support for ChangeIP.com Update API
Create a Makefile
to automate PyPI dist upload.
Implement support for custom DDNS (via --url
parameter โ) as proposed by @jayennis22
Create a better documentation with Read the Docs.
Dependabot couldn't authenticate with https://pypi.python.org/simple/.
You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.