Skip to main content

Python SDK for BroadWorks OCI (Open Client Interface) API

Project description

Mercury

Downloads Downloads Downloads pypi version

Mercury

Mercury is an SDK for interfacing with Broadworks OCIP interface either via TCP or SOAP.


Overview

Mercury has extensive documentation, automation, and more to better manage Broadworks instances.

The package is currently actively managed by the Dev Team at Fourteen IP the leading solution of hosted telephony in the hospitality industry. The team is working with the whole company including platform and telephony engineers with decades of experience.

The goal of the solution is to ease the management of Broadworks and give engineers tooling to better configure and administrate.


Important Legal Notice

Mercury is an independent, open-source project and is NOT affiliated with, endorsed by, or supported by Cisco Systems, Inc.

BroadWorks is a product and trademark of Cisco Systems, Inc. Mercury provides a client interface to interact with BroadWorks systems via the Open Client Interface Protocol(OCI-P).

Mercury does not bypass, circumvent, or provide any additional permissions or licenses. To use Mercury, you must:

  • Have an active, licensed BroadWorks system from Cisco
  • Possess valid credentials and appropriate access permissions
  • Comply with all Cisco licensing terms and agreements

The OCI-P commands implemented in Mercury are generated from XML schemas. These schemas are:

Copyright © 2018 BroadSoft Inc. (now part of Cisco Systems, Inc.) All rights reserved.

Mercury implements these publicly documented interfaces and does not include any proprietary Cisco code or intellectual property. All command structures follow the official OCI-P specification.


Features

  • Interface with Broadworks OCIP via SOAP or TCP
  • Command logic to seamlessly use API
  • Asynchronous version
  • Bulk and automated features (Requested by Broadworks engineers with decades of experience)

If you would like to submit a feature request please raise an issue detailing your request.


Installation

Install Mercury using pip:

pip install mercury-ocip

Basic Usage

Here's a simple example to get you started:

from mercury import Client

#SOAP (recommended for most cases):
client = Client(
    host="https://your-server.com",  # No /wsdl suffix needed
    username="your_user",
    password="your_pass",
    conn_type="SOAP"
)

#TCP (for legacy systems or specific requirements):
client = AsyncClient(
    host="broadworks.company.com",
    port=2209,  # Usually 2209/2208 for TCP
    username="admin",
    password="password",
    conn_type="TCP",
    tls=True  # Set False for unencrypted (not recommended)
)

# example usage
response = client.raw_command("SystemSoftwareVersionGetRequest")

print(response)
# Returns: SystemSoftwareVersionGetResponse(version='24')

print(response.to_dict()) 
# Returns: {'version': '24'}

print(response.to_json()) 
# Returns: '{'version': '24'}'

print(response.to_xml()) 
# Returns: <command ... "SystemSoftwareVersionGetResponse"><version>24</version></command>

Agent Usage (In Development)

Here's a simple example to get you started:

from mercury import Client, Agent

client = Client(
    host="url",
    username="username",
    password="password",
)

agent = Agent.get_instance(client)

agent.automate.find_alias(
    "servicePovider",
    "groupId",
    alias=0
) # returns Broadworks enity where alias is assigned.

agent.bulk.create_users_from_csv(
    path="local/file/path"
) # Bulk builds all users in predefined bulk sheet

Credits

This package builds upon the excellent work of the Broadworks OCI-P Interface package. Special thanks to:

@nigelm (Nigel Metheringham) – Developer of the original Python version.

Karol Skibiński – For extensive testing, bug reporting, and valuable contributions.

@ewurch (Eduardo Würch) – For contributing the R25 schema update and other improvements.

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

mercury_ocip-1.1.0b0.tar.gz (495.1 kB view details)

Uploaded Source

Built Distribution

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

mercury_ocip-1.1.0b0-py3-none-any.whl (506.3 kB view details)

Uploaded Python 3

File details

Details for the file mercury_ocip-1.1.0b0.tar.gz.

File metadata

  • Download URL: mercury_ocip-1.1.0b0.tar.gz
  • Upload date:
  • Size: 495.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mercury_ocip-1.1.0b0.tar.gz
Algorithm Hash digest
SHA256 fc840d55ea0602505743b704ec1ebcd6ee99d6ea8e2703bf15f901821d8535e5
MD5 3d0e94c23d9c0859b1e4c23cac9b498a
BLAKE2b-256 3b5ce71904b5db1b16c6de74e3b03fee047458d256d813ff531fe8890e2ca75e

See more details on using hashes here.

File details

Details for the file mercury_ocip-1.1.0b0-py3-none-any.whl.

File metadata

  • Download URL: mercury_ocip-1.1.0b0-py3-none-any.whl
  • Upload date:
  • Size: 506.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mercury_ocip-1.1.0b0-py3-none-any.whl
Algorithm Hash digest
SHA256 72f43345eeadbc0f420073b55dfe8f1745724d2cac885be101d63d3ef70ae512
MD5 4a9d523406f354393f3d2486466e1c20
BLAKE2b-256 91cf0b90f6a0c37dfb1a620839b8d7ea5823f7f9318566a0f1c123a10c97ab9b

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