Metadata-Version: 2.4
Name: mercury-ocip-fast
Version: 1.0.0
Summary: Asynchronous Python SDK for BroadWorks OCI (Open Client Interface) API
Author-email: Jordan Prescott <devteam@fourteenip.com>, Michael Clarke <devteam@fourteenip.com>, Billy Kelly <devteam@fourteenip.com>
License: MIT License
        
        Copyright (c) 2025 Fourteen IP Communications 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
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Keywords: broadworks,oci,telephony,voip,sdk,api,mercury,async,asynchronous
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Communications :: Telephony
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: attrs>=21.4.0
Requires-Dist: xmltodict>=1.0.2
Dynamic: license-file

[![Downloads](https://static.pepy.tech/badge/mercury-ocip)](https://pepy.tech/project/mercury-ocip-fast)
[![Downloads](https://static.pepy.tech/badge/mercury-ocip/month)](https://pepy.tech/project/mercury-ocip-fast)
[![Downloads](https://static.pepy.tech/badge/mercury-ocip/week)](https://pepy.tech/project/mercury-ocip-fast)
[![pypi version](https://img.shields.io/pypi/v/mercury-ocip.svg)](https://pypi.python.org/pypi/mercury-ocip-fast)

# mercury-ocip-fast

mercury-ocip-fast is a lightning fast and async-first Python SDK for BroadWorks OCI-P. It uses connection pooling and concurrent request batching to handle bulk operations efficiently.

---

```python
from mercury_ocip_fast import Client
from mercury_ocip_fast.commands import UserGetRequest21sp1

async with Client(
        host="broadworks.server",
        username="admin",
        password="secret"
    ) as client:
        # single request
        response = await client.command(
            UserGetRequest21sp1(
                    user_id="user@example.com"
                )
            )

        # bulk requests - batched and processed concurrently
        users = ["user1@example.com", "user2@example.com", "user3@example.com"]
        responses = await client.command(
                [
                    UserGetRequest21sp1(user_id=u)
                    for u in users
                ]
            )
```

---

![Async vs Sync Performance](assets/figure.png)
^ mercury-ocip vs mercury-ocip-fast - This test included retrieving 2000+ users from a Group, and resulted in a 67x speed increase compared to mercury-ocip!

---

This is a backend focused tool, made to be lightweight, fast, and stable as a counterpart to mercury-ocip. Not intended for general scripting and automations.

> [Checkout our automation focused library here!](https://github.com/Fourteen-IP/mercury-ocip)

Testing has shown that the tool can negatively impact BroadWorks infrastructure, as it allows a very high volume of requests to be sent within a short period of time. The extent of the impact will vary from cluster to cluster, depending on hardware specifications, network capacity, and other general factors. Please use this responsibly, high capability requires careful consideration.

---

## 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.

---
