{"id":20620535,"url":"https://github.com/blacklight/pyobex","last_synced_at":"2025-04-15T12:13:56.510Z","repository":{"id":37714695,"uuid":"227221631","full_name":"blacklight/PyOBEX","owner":"blacklight","description":"pyobex port for Python 3","archived":false,"fork":false,"pushed_at":"2023-03-24T10:23:43.000Z","size":221,"stargazers_count":2,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-15T12:13:39.379Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blacklight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-10T21:43:58.000Z","updated_at":"2024-05-14T12:14:44.000Z","dependencies_parsed_at":"2022-08-30T03:51:48.240Z","dependency_job_id":null,"html_url":"https://github.com/blacklight/PyOBEX","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacklight%2FPyOBEX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacklight%2FPyOBEX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacklight%2FPyOBEX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacklight%2FPyOBEX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blacklight","download_url":"https://codeload.github.com/blacklight/PyOBEX/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249067779,"owners_count":21207396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T12:14:49.071Z","updated_at":"2025-04-15T12:13:56.491Z","avatar_url":"https://github.com/blacklight.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"PyOBEX Python 3 Package\n=======================\n\nAuthor: `David Boddie`_\nDate: 2015-01-22\nVersion: 0.26\n\nPython 3 porting: `Fabio Manganiello`_\nDate: 2019-12-11\nVersion: 0.28\n\n\nIntroduction\n------------\n\nThe Object Exchange (OBEX_) protocol is a widely used protocol for network\ncommunication between Bluetooth and infra-red devices that provides the\nfoundation for a number of common tasks, such as file transfer and data\nsynchronization via the use of \"profiles\".\n\nAlthough Bluetooth communication is well-supported on the most popular\noperating systems, support for OBEX is limited by the restricted amount of\ninformation freely available on the protocol. The specification of the protocol\nis published by the Infrared Data Association (IrDA_). Non-members of this\nassociation must pay a fee to obtain a copy of the specification document.\n\nMost applications and libraries that provide connectivity between, for example,\ndesktop computers and mobile phones use the OpenOBEX_ library to communicate\nusing the OBEX protocol.\n\nThis package provides a simple Python_ implementation of aspects of the OBEX\nprotocol based on the information available in freely available\n`Bluetooth specifications`_ and other openly accessible online resources.\nIt is not intended to be a complete, accurate, or fully functioning\nimplementation of the protocol. Developers may wish to build upon this\npackage to implement support for more of the protocol, or to create\nuser-friendly tools. See the Projects section below for links to projects\nthat use PyOBEX.\n\nThis package depends on Bluetooth support in the standard Python ``socket``\nmodule. Users of Linux and Windows XP systems may also find the PyBluez_\npackage useful; this provides the ``bluetooth`` module described below.\n\n\nInstallation\n------------\n\nTo install the package alongside other packages and modules in your Python\ninstallation, unpack the contents of the archive. At the command line, enter\nthe directory containing the ``setup.py`` script and install it by typing the\nfollowing::\n\n```\n python setup.py install\n```\n\nYou may need to become the root user or administrator to do this.\n\n\nLocating the Bluetooth device\n-----------------------------\n\nLow level discovery of Bluetooth devices and services is provided by the\n``bluetooth`` module, distributed as part of the PyBluez_ package. You need to\nuse the following calls to determine the address of the device you wish to\nconnect to.\n\nDiscover the devices available by calling::\n\n```\ndevices = bluetooth.discover_devices()\n```\n\nLook up names by calling::\n\n```\nbluetooth.lookup_name(device_address)\n```\n\non each device in the devices list.\n\nFind out about the services provided by a device by calling::\n\n```\nbluetooth.find_service(address=device_address)\n```\n\nOn my phone, the file transfer service has the service ID, \"E006\", so we can\nfind out the port on the device that we need to connect to when using the\nBrowserClient from the PyOBEX.client module::\n\n```\nservices = bluetooth.find_service(uuid=\"E006\", address=device_address)\n```\n\nThe list returned contains dictionaries corresponding to each service. The port\nused by a service can be obtained from the \"port\" dictionary entry. Assuming\nthat the previous line of code returned a list containing a single item, we can\nobtain the port using the following code::\n\n```\nport = services[0][\"port\"]\n```\n\nThis integer value will be required when connecting to the service.\n\n\nUsing the PyOBEX package\n------------------------\n\nThe PyOBEX package contains the following modules:\n\n- ``__init__.py``\n            Package file for the PyOBEX Python package.\n- ``common.py``\n            Classes providing common facilities for other modules.\n- ``client.py``\n            Client classes for sending OBEX requests and handling responses.\n- ``headers.py``\n            Classes encapsulating OBEX headers.\n- ``requests.py``\n            Classes encapsulating OBEX requests.\n- ``responses.py``\n            Classes encapsulating OBEX responses.\n\nFor most people, the client module is the most useful module because it\nprovides a reasonably high level API that can be used to interact with a\nBluetooth device.\n\nUsing appropriate values for ``device_address`` and ``port`` obtained using the\n``bluetooth`` module, or alternative tools on your system, the following code\ncan be used to list the files in the root directory on a device::\n\n```python\nfrom PyOBEX.client import BrowserClient\nclient = BrowserClient(device_address, port)\nclient.connect()\nclient.listdir()\nclient.disconnect()\n```\n\nOther methods of the ``BrowserClient`` object can be used to get and put files,\nset the current directory and delete files. Use the interactive help facilities\nto find out more or read the docstrings in the source code.\n\n\nProjects\n--------\n\nProjects that use or extend PyOBEX are described in their own words in this\nsection.\n\n`SyncBlue`_: \"SyncBlue is an open-source project with the aim of developing a utility for keeping files and folders synchronized across devices of various platforms without relying on the cloud.\"\n\n\nResources\n---------\n\nListing services under Linux::\n\n  sdptool browse \u003cdevice address\u003e\n\nA list of services is available in the OpenOBEX Trac site:\n\n* http://www.openobex.org\n* http://dev.zuckschwerdt.org/openobex/wiki/ObexFtpServices\n\n\nNotes on the Sony Ericsson K750i\n--------------------------------\n\nIn file browsing mode, you may be able to obtain low level information about\nthe directory structure on the phone by calling the client's get() method with\nan empty string.\n\n\nLicense\n-------\n\nThe contents of this package are licensed under the GNU General Public License\n(version 3 or later)::\n\n PyOBEX, a Python package implementing aspects of the Object Exchange (OBEX) protocol.\n Copyright (C) 2007 David Boddie \u003cdavid@boddie.org.uk\u003e\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n\n\n\n.. _`IrDA`:                     http://www.irda.org/\n\n.. _`OBEX`:                     http://bluetooth.com/Bluetooth/Technology/Works/OBEX.htm\n\n.. _`Bluetooth specifications`: http://bluetooth.com/Bluetooth/Technology/Building/Specifications/Default.htm\n\n.. _`OpenOBEX`:                 http://dev.zuckschwerdt.org/openobex/\n\n.. _`PyBluez`:                  http://code.google.com/p/pybluez/\n\n.. _Python:                     http://www.python.org/\n\n.. _`David Boddie`:             mailto:david@boddie.org.uk\n\n.. _SyncBlue:                   http://www.syncblue.eu/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblacklight%2Fpyobex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblacklight%2Fpyobex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblacklight%2Fpyobex/lists"}