diff --git a/.gitignore b/.gitignore index 4f641b0..12df49a 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,8 @@ target/ # Nimvelo example.py + +# local virtualenv +Pipfile +Pipfile.lock +.venv/ diff --git a/.hgignore b/.hgignore new file mode 100644 index 0000000..bf19f92 --- /dev/null +++ b/.hgignore @@ -0,0 +1,65 @@ +# Byte-compiled / optimized / DLL files +^__pycache__/ +\.py[cod]$ + +# C extensions +\.so$ + +# Distribution / packaging +\.Python +^env/ +^build/ +^develop-eggs/ +^dist/ +^downloads/ +^eggs/ +^\.eggs/ +^lib/ +^lib64/ +^parts/ +^sdist/ +^var/ +^\.egg-info/ +^\.installed.cfg$ +\.egg$ + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +\.manifest$ +\.spec$ + +# Installer logs +^pip-log\.txt$ +^pip-delete-this-directory\.txt$ + +# Unit test / coverage reports +^htmlcov/ +^\.tox/ +^\.coverage$ +^\.coverage\. +^\.cache$ +^nosetests\.xml$ +^coverage\.xml$ +,cover$ + +# Translations +\.mo$ +\.pot$ + +# Django stuff: +\.log$ + +# Sphinx documentation +^docs/_build/ + +# PyBuilder +^target/ + +# Nimvelo +^example\.py$ + +# local virtualenv +^Pipfile$ +^Pipfile\.lock$ +^\.venv/ diff --git a/LICENSE b/LICENSE index b9ffee6..daddceb 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ The MIT License (MIT) Copyright (c) 2015 Sipcentric Ltd. +Copyright (c) 2022 Faelix Limited Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 40c937f..f0a16f0 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # Nimvelo Python Client -Python 2.7 client library for the Nimvelo/Sipcentric API +Modern Python client library for the Nimvelo/Sipcentric API ```python -from nimvelo import Nimvelo +from nimvelo3 import Nimvelo nimvelo = Nimvelo(username="myusername", password="mypassword") print nimvelo.sms.post(_from="0123", to="03301201200", body="Hello World!") ``` @@ -21,7 +21,7 @@ sudo pip install nimvelo ### Manual method ``` -git clone git@github.com:Nimvelo/python-client.git && cd python-client +git clone git@github.com:faelix/nimvelo3.git && cd nimvelo3 sudo python setup.py install ``` @@ -32,7 +32,7 @@ sudo python setup.py install **Get account details** ```python -from nimvelo import Nimvelo +from nimvelo3 import Nimvelo nimvelo = Nimvelo(username="myusername", password="mypassword") @@ -42,7 +42,7 @@ print nimvelo.account.get() **Connect to the streaming api** ```python -from nimvelo import Nimvelo +from nimvelo3 import Nimvelo nimvelo = Nimvelo(username="myusername", password="mypassword") stream = nimvelo.Stream @@ -61,7 +61,7 @@ stream.connect() ## Reference -- nimvelo.Nimvelo(username, password, base='https://pbx.sipcentric.com/api/v1', customer='me') +- nimvelo3.Nimvelo(username, password, base='https://pbx.sipcentric.com/api/v1', customer='me') - account - get() - callBundles @@ -91,3 +91,7 @@ stream.connect() - register(type, callback) - connect() - disconnect() + +## History + +This project was forked from Nimvelo's original project (for Python 2.7) [python-client](https://github.com/Nimvelo/python-client). The name was changed to `nimvelo3` to make migration to Python 3.x codebases as simple as possible. diff --git a/nimvelo/__init__.py b/nimvelo3/__init__.py similarity index 95% rename from nimvelo/__init__.py rename to nimvelo3/__init__.py index 32540e3..06ddfbd 100644 --- a/nimvelo/__init__.py +++ b/nimvelo3/__init__.py @@ -1,9 +1,10 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # nimvelo/__init__.py -# Python 2.7 client library for the Nimvelo/Sipcentric API +# Modern Python client library for the Simwood Partner (Nimvelo/Sipcentric) API # Copyright (c) 2015 Sipcentric Ltd. Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php +# Copyright (c) 2022 Faelix Limited. Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php import sys import math @@ -13,7 +14,7 @@ import logging import simplejson as json -from stream import Stream +from .stream import Stream logger = logging.getLogger(__name__) diff --git a/nimvelo/stream/__init__.py b/nimvelo3/stream/__init__.py similarity index 92% rename from nimvelo/stream/__init__.py rename to nimvelo3/stream/__init__.py index 844e4fd..e9ef989 100644 --- a/nimvelo/stream/__init__.py +++ b/nimvelo3/stream/__init__.py @@ -1,9 +1,10 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # nimvelo/stream/__init__.py -# Python 2.7 client library for the Nimvelo/Sipcentric API +# Modern Python client library for the Simwood Partner (Nimvelo/Sipcentric) API # Copyright (c) 2015 Sipcentric Ltd. Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php +# Copyright (c) 2022 Faelix Limited. Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php import multiprocessing import requests diff --git a/setup.py b/setup.py index ba8b851..28f913b 100755 --- a/setup.py +++ b/setup.py @@ -1,23 +1,24 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # setup.py -# Python 2.7 client library for the Nimvelo/Sipcentric API +# Modern Python client library for the Simwood Partner (Nimvelo/Sipcentric) API # Copyright (c) 2015 Sipcentric Ltd. Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php +# Copyright (c) 2022 Faelix Limited. Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php import os from setuptools import setup setup( - name='nimvelo', - description='Python 2.7 client library for the Nimvelo/Sipcentric API', + name='nimvelo3', + description='Modern Python client library for the Simwood Partner (Nimvelo/Sipcentric) API', version='0.1.4', - url='https://github.com/Nimvelo/python-client', - author='David Maitland', - author_email='david.maitland@nimvelo.com', + url='https://github.com/faelix/nimvelo3', + author='Marek Isalski', + author_email='pypi-nimvelo3@maz.nu', license='MIT', - keywords='nimvelo sipcentric voip pbx sms sip', - packages=['nimvelo', 'nimvelo/stream'], + keywords='nimvelo sipcentric simwood voip pbx sms sip', + packages=['nimvelo3', 'nimvelo3/stream'], requires=['math', 'json', 'logging', 'time', 'simplejson'], - install_requires=['requests'] + install_requires=['requests', 'simplejson'], )