fork nimvelo3 and start project

This commit is contained in:
Marek Isalski 2022-01-12 12:27:17 +00:00
parent 10c1d9066e
commit 23ccc01d5b
7 changed files with 99 additions and 21 deletions

5
.gitignore vendored
View File

@ -58,3 +58,8 @@ target/
# Nimvelo # Nimvelo
example.py example.py
# local virtualenv
Pipfile
Pipfile.lock
.venv/

65
.hgignore Normal file
View File

@ -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/

View File

@ -1,6 +1,7 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2015 Sipcentric Ltd. Copyright (c) 2015 Sipcentric Ltd.
Copyright (c) 2022 Faelix Limited
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -1,9 +1,9 @@
# Nimvelo Python Client # Nimvelo Python Client
Python 2.7 client library for the Nimvelo/Sipcentric API Modern Python client library for the Nimvelo/Sipcentric API
```python ```python
from nimvelo import Nimvelo from nimvelo3 import Nimvelo
nimvelo = Nimvelo(username="myusername", password="mypassword") nimvelo = Nimvelo(username="myusername", password="mypassword")
print nimvelo.sms.post(_from="0123", to="03301201200", body="Hello World!") print nimvelo.sms.post(_from="0123", to="03301201200", body="Hello World!")
``` ```
@ -21,7 +21,7 @@ sudo pip install nimvelo
### Manual method ### 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 sudo python setup.py install
``` ```
@ -32,7 +32,7 @@ sudo python setup.py install
**Get account details** **Get account details**
```python ```python
from nimvelo import Nimvelo from nimvelo3 import Nimvelo
nimvelo = Nimvelo(username="myusername", password="mypassword") nimvelo = Nimvelo(username="myusername", password="mypassword")
@ -42,7 +42,7 @@ print nimvelo.account.get()
**Connect to the streaming api** **Connect to the streaming api**
```python ```python
from nimvelo import Nimvelo from nimvelo3 import Nimvelo
nimvelo = Nimvelo(username="myusername", password="mypassword") nimvelo = Nimvelo(username="myusername", password="mypassword")
stream = nimvelo.Stream stream = nimvelo.Stream
@ -61,7 +61,7 @@ stream.connect()
## Reference ## 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 - account
- get() - get()
- callBundles - callBundles
@ -91,3 +91,7 @@ stream.connect()
- register(type, callback) - register(type, callback)
- connect() - connect()
- disconnect() - 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.

View File

@ -1,9 +1,10 @@
#!/usr/bin/env python2.7 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# nimvelo/__init__.py # 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) 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 sys
import math import math
@ -13,7 +14,7 @@ import logging
import simplejson as json import simplejson as json
from stream import Stream from .stream import Stream
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

View File

@ -1,9 +1,10 @@
#!/usr/bin/env python2.7 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# nimvelo/stream/__init__.py # 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) 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 multiprocessing
import requests import requests

View File

@ -1,23 +1,24 @@
#!/usr/bin/env python2.7 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# setup.py # 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) 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 import os
from setuptools import setup from setuptools import setup
setup( setup(
name='nimvelo', name='nimvelo3',
description='Python 2.7 client library for the Nimvelo/Sipcentric API', description='Modern Python client library for the Simwood Partner (Nimvelo/Sipcentric) API',
version='0.1.4', version='0.1.4',
url='https://github.com/Nimvelo/python-client', url='https://github.com/faelix/nimvelo3',
author='David Maitland', author='Marek Isalski',
author_email='david.maitland@nimvelo.com', author_email='pypi-nimvelo3@maz.nu',
license='MIT', license='MIT',
keywords='nimvelo sipcentric voip pbx sms sip', keywords='nimvelo sipcentric simwood voip pbx sms sip',
packages=['nimvelo', 'nimvelo/stream'], packages=['nimvelo3', 'nimvelo3/stream'],
requires=['math', 'json', 'logging', 'time', 'simplejson'], requires=['math', 'json', 'logging', 'time', 'simplejson'],
install_requires=['requests'] install_requires=['requests', 'simplejson'],
) )