Skip to main content

Python client LIB for FusionPBX

Project description

FusionPBX Pilot Python Library

Gnovit

email: fusionpbx-pilot@gnovit.com

This python library is intended to automate FusionPBX administrative tasks. This library is based on Selenium WebDriver and abstracts FusionPBX objects as python objects. Should be used in an API to manage FusionPBX. This is licensed under the terms of the GNU GPL v3 license.

Examples

Install the library:

python3 -m venv .venv
source .venv/bin/activate
pip install fusionpbx-pilot

Install webdriver_manager to automatically manage the browser driver:

pip install webdriver_manager

Install GeckoDriver and instantiate the FusionPBX class:

from selenium import webdriver
from selenium.webdriver.firefox.service import Service as FirefoxService
from webdriver_manager.firefox import GeckoDriverManager
from selenium.webdriver.firefox.service import Service as FirefoxService
from fusionpbx_pilot.page_objects import FusionPBX


service = FirefoxService(GeckoDriverManager().install())
driver = webdriver.Firefox(service=service)

f = FusionPBX(driver, '<https://addr>', '<login_user>', '<login_password>')
  • Set domain object: If domain no exist, raises DomainNotFound exception.
d = f.domain('<domain_name>')
  • To create a new domain, use the following:
d = f.domain('<domain_name>', create=True)

Returns a new domain object.

Domain manipulate

  • Domain rename:
d.name = '<new_domain_name>'
  • Domain get uuid:
d.uuid
  • Domain delete: You must to add domain delete permission to the user used to login to FusionPBX.
del f.domain.name

Extensions manipulate

  • List all extensions of a domain:
d.extensions.list()
  • Set or create an extension object:
e = d.extension('<extension_name>')

Generally extension name is a number...

If extension no exist, the lib will create it.

  • Rename extension object
e.name = '<new_extension_name>'
  • Get or set password
e.password

Returns password

e.password = '<new_password>'

Set the password

  • Get or set voicemail enabled:
e.voicemail_enabled
  • Get or set voicemail_mail_to:
e.voicemail_mail_to
  • Get UUID:
e.uuid
  • Delete extension
del d.extension.name

Contributions

Contribuitions are welcome. Please fork the project and send a pull request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fusionpbx_pilot-0.2.2.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fusionpbx_pilot-0.2.2-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file fusionpbx_pilot-0.2.2.tar.gz.

File metadata

  • Download URL: fusionpbx_pilot-0.2.2.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.13

File hashes

Hashes for fusionpbx_pilot-0.2.2.tar.gz
Algorithm Hash digest
SHA256 97bd025ca1e1886b6430db6db3187eda406d2ead369c4ac1ba93085a9bb4f341
MD5 ce6238c1d6c7e348ec8ffd810c38a63e
BLAKE2b-256 a1bbb1baa522282162ecfc293c857cdf97ca154d274c7a8ec663ad2ac578e5bd

See more details on using hashes here.

File details

Details for the file fusionpbx_pilot-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for fusionpbx_pilot-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9cad2b7c246891abd817266065dd26f76f93314e24e99c0f04d71f695505d89a
MD5 48abdd093be4bd67a7a94089ed61b13a
BLAKE2b-256 d5ed92c2f325a803cc9f7e549c4d4b193557ad21a6a748308c309f09c6e1a96c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page