botframework-connector


Namebotframework-connector JSON
Version 4.14.8 PyPI version JSON
download
home_pagehttps://www.github.com/Microsoft/botbuilder-python
SummaryMicrosoft Bot Framework Bot Builder SDK for Python.
upload_time2024-01-26 15:44:18
maintainer
docs_urlNone
authorMicrosoft
requires_python
licenseMIT
keywords botframeworkconnector bots ai botframework botbuilder
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            
============================================
Microsoft Bot Framework Connector for Python
============================================

.. image:: https://dev.azure.com/FuseLabs/SDK_v4/_apis/build/status/Python/Python-CI-PR-yaml?branchName=master
   :target:  https://dev.azure.com/FuseLabs/SDK_v4/_apis/build/status/Python/Python-CI-PR-yaml?branchName=master
   :align: right
   :alt: Azure DevOps status for master branch
.. image:: https://badge.fury.io/py/botframework-connector.svg
   :target: https://badge.fury.io/py/botframework-connector
   :alt: Latest PyPI package version

Within the Bot Framework, the Bot Connector service enables your bot to exchange messages with users on channels that are configured in the Bot Framework Portal.

How to Install
==============

.. code-block:: python

  pip install botframework-connector

How to Use
==========

Authentication
==============

Your bot communicates with the Bot Connector service using HTTP over a secured channel (SSL/TLS). When your bot sends a request to the Connector service, it must include information that the Connector service can use to verify its identity.

To authenticate the requests, you'll need configure the Connector with the App ID and password that you obtained for your bot during registration and the Connector will handle the rest.

More information: https://docs.microsoft.com/en-us/bot-framework/rest-api/bot-framework-rest-connector-authentication

Example
=======

Client creation (with authentication), conversation initialization and activity send to user.

.. code-block:: python

  from botbuilder.schema import *
  from botframework.connector import ConnectorClient
  from botframework.connector.auth import MicrosoftAppCredentials

  APP_ID = '<your-app-id>'
  APP_PASSWORD = '<your-app-password>'
  SERVICE_URL = 'https://slack.botframework.com'
  CHANNEL_ID = 'slack'
  BOT_ID = '<bot-id>'
  RECIPIENT_ID = '<user-id>'

  credentials = MicrosoftAppCredentials(APP_ID, APP_PASSWORD)
  connector = ConnectorClient(credentials, base_url=SERVICE_URL)

  conversation = connector.conversations.create_conversation(ConversationParameters(
              bot=ChannelAccount(id=BOT_ID),
              members=[ChannelAccount(id=RECIPIENT_ID)]))

  connector.conversations.send_to_conversation(conversation.id, Activity(
              type=ActivityTypes.message,
              channel_id=CHANNEL_ID,
              recipient=ChannelAccount(id=RECIPIENT_ID),
              from_property=ChannelAccount(id=BOT_ID),
              text='Hello World!'))


Rest API Documentation
======================

For the Connector Service API Documentation, please see our `API reference`_.

Documentation/Wiki
==================

You can find more information on the botbuilder-python project by visiting our `Wiki`_.

Requirements
============

* `Python >= 3.7.0`_


Source Code
===========
The latest developer version is available in a github repository:
https://github.com/Microsoft/botbuilder-python/


Contributing
============

This project welcomes contributions and suggestions.  Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the `Microsoft Open Source Code of Conduct`_.
For more information see the `Code of Conduct FAQ`_ or
contact `opencode@microsoft.com`_ with any additional questions or comments.

Reporting Security Issues
=========================

Security issues and bugs should be reported privately, via email, to the Microsoft Security
Response Center (MSRC) at `secure@microsoft.com`_. You should
receive a response within 24 hours. If for some reason you do not, please follow up via
email to ensure we received your original message. Further information, including the
`MSRC PGP`_ key, can be found in
the `Security TechCenter`_.

License
=======

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT_ License.

.. _API Reference: https://docs.microsoft.com/en-us/Bot-Framework/rest-api/bot-framework-rest-connector-api-reference
.. _Wiki: https://github.com/Microsoft/botbuilder-python/wiki
.. _Python >= 3.7.0: https://www.python.org/downloads/
.. _MIT: https://github.com/Microsoft/vscode/blob/master/LICENSE.txt
.. _Microsoft Open Source Code of Conduct: https://opensource.microsoft.com/codeofconduct/
.. _Code of Conduct FAQ: https://opensource.microsoft.com/codeofconduct/faq/
.. _opencode@microsoft.com: mailto:opencode@microsoft.com
.. _secure@microsoft.com: mailto:secure@microsoft.com
.. _MSRC PGP: https://technet.microsoft.com/en-us/security/dn606155
.. _Security TechCenter: https://github.com/Microsoft/vscode/blob/master/LICENSE.txt

.. <https://technet.microsoft.com/en-us/security/default>`_



            

Raw data

            {
    "_id": null,
    "home_page": "https://www.github.com/Microsoft/botbuilder-python",
    "name": "botframework-connector",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "BotFrameworkConnector,bots,ai,botframework,botbuilder",
    "author": "Microsoft",
    "author_email": "",
    "download_url": "",
    "platform": null,
    "description": "\n============================================\nMicrosoft Bot Framework Connector for Python\n============================================\n\n.. image:: https://dev.azure.com/FuseLabs/SDK_v4/_apis/build/status/Python/Python-CI-PR-yaml?branchName=master\n   :target:  https://dev.azure.com/FuseLabs/SDK_v4/_apis/build/status/Python/Python-CI-PR-yaml?branchName=master\n   :align: right\n   :alt: Azure DevOps status for master branch\n.. image:: https://badge.fury.io/py/botframework-connector.svg\n   :target: https://badge.fury.io/py/botframework-connector\n   :alt: Latest PyPI package version\n\nWithin the Bot Framework, the Bot Connector service enables your bot to exchange messages with users on channels that are configured in the Bot Framework Portal.\n\nHow to Install\n==============\n\n.. code-block:: python\n\n  pip install botframework-connector\n\nHow to Use\n==========\n\nAuthentication\n==============\n\nYour bot communicates with the Bot Connector service using HTTP over a secured channel (SSL/TLS). When your bot sends a request to the Connector service, it must include information that the Connector service can use to verify its identity.\n\nTo authenticate the requests, you'll need configure the Connector with the App ID and password that you obtained for your bot during registration and the Connector will handle the rest.\n\nMore information: https://docs.microsoft.com/en-us/bot-framework/rest-api/bot-framework-rest-connector-authentication\n\nExample\n=======\n\nClient creation (with authentication), conversation initialization and activity send to user.\n\n.. code-block:: python\n\n  from botbuilder.schema import *\n  from botframework.connector import ConnectorClient\n  from botframework.connector.auth import MicrosoftAppCredentials\n\n  APP_ID = '<your-app-id>'\n  APP_PASSWORD = '<your-app-password>'\n  SERVICE_URL = 'https://slack.botframework.com'\n  CHANNEL_ID = 'slack'\n  BOT_ID = '<bot-id>'\n  RECIPIENT_ID = '<user-id>'\n\n  credentials = MicrosoftAppCredentials(APP_ID, APP_PASSWORD)\n  connector = ConnectorClient(credentials, base_url=SERVICE_URL)\n\n  conversation = connector.conversations.create_conversation(ConversationParameters(\n              bot=ChannelAccount(id=BOT_ID),\n              members=[ChannelAccount(id=RECIPIENT_ID)]))\n\n  connector.conversations.send_to_conversation(conversation.id, Activity(\n              type=ActivityTypes.message,\n              channel_id=CHANNEL_ID,\n              recipient=ChannelAccount(id=RECIPIENT_ID),\n              from_property=ChannelAccount(id=BOT_ID),\n              text='Hello World!'))\n\n\nRest API Documentation\n======================\n\nFor the Connector Service API Documentation, please see our `API reference`_.\n\nDocumentation/Wiki\n==================\n\nYou can find more information on the botbuilder-python project by visiting our `Wiki`_.\n\nRequirements\n============\n\n* `Python >= 3.7.0`_\n\n\nSource Code\n===========\nThe latest developer version is available in a github repository:\nhttps://github.com/Microsoft/botbuilder-python/\n\n\nContributing\n============\n\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the `Microsoft Open Source Code of Conduct`_.\nFor more information see the `Code of Conduct FAQ`_ or\ncontact `opencode@microsoft.com`_ with any additional questions or comments.\n\nReporting Security Issues\n=========================\n\nSecurity issues and bugs should be reported privately, via email, to the Microsoft Security\nResponse Center (MSRC) at `secure@microsoft.com`_. You should\nreceive a response within 24 hours. If for some reason you do not, please follow up via\nemail to ensure we received your original message. Further information, including the\n`MSRC PGP`_ key, can be found in\nthe `Security TechCenter`_.\n\nLicense\n=======\n\nCopyright (c) Microsoft Corporation. All rights reserved.\n\nLicensed under the MIT_ License.\n\n.. _API Reference: https://docs.microsoft.com/en-us/Bot-Framework/rest-api/bot-framework-rest-connector-api-reference\n.. _Wiki: https://github.com/Microsoft/botbuilder-python/wiki\n.. _Python >= 3.7.0: https://www.python.org/downloads/\n.. _MIT: https://github.com/Microsoft/vscode/blob/master/LICENSE.txt\n.. _Microsoft Open Source Code of Conduct: https://opensource.microsoft.com/codeofconduct/\n.. _Code of Conduct FAQ: https://opensource.microsoft.com/codeofconduct/faq/\n.. _opencode@microsoft.com: mailto:opencode@microsoft.com\n.. _secure@microsoft.com: mailto:secure@microsoft.com\n.. _MSRC PGP: https://technet.microsoft.com/en-us/security/dn606155\n.. _Security TechCenter: https://github.com/Microsoft/vscode/blob/master/LICENSE.txt\n\n.. <https://technet.microsoft.com/en-us/security/default>`_\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Microsoft Bot Framework Bot Builder SDK for Python.",
    "version": "4.14.8",
    "project_urls": {
        "Homepage": "https://www.github.com/Microsoft/botbuilder-python"
    },
    "split_keywords": [
        "botframeworkconnector",
        "bots",
        "ai",
        "botframework",
        "botbuilder"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e176b3eeb4e01636a6ea790d955f568b7251c1a31e3fd1183eb127e40a97a8d3",
                "md5": "30e19a461bccb5f7006070f931590bd2",
                "sha256": "3aa90d0854f1c3c96a96fee6d5dbc8698b8064f571dff7635bc725c5df10a04e"
            },
            "downloads": -1,
            "filename": "botframework_connector-4.14.8-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "30e19a461bccb5f7006070f931590bd2",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 96164,
            "upload_time": "2024-01-26T15:44:18",
            "upload_time_iso_8601": "2024-01-26T15:44:18.523473Z",
            "url": "https://files.pythonhosted.org/packages/e1/76/b3eeb4e01636a6ea790d955f568b7251c1a31e3fd1183eb127e40a97a8d3/botframework_connector-4.14.8-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-26 15:44:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Microsoft",
    "github_project": "botbuilder-python",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "botframework-connector"
}
        
Elapsed time: 0.23565s