A simple Python API for Tile® Bluetooth trackers
Project description
📡 pytile: A simple Python API for Tile® Bluetooth trackers
.. image:: https://travis-ci.org/bachya/pytile.svg?branch=master :target: https://travis-ci.org/bachya/pytile
.. image:: https://img.shields.io/pypi/v/pytile.svg :target: https://pypi.python.org/pypi/pytile
.. image:: https://img.shields.io/pypi/pyversions/pytile.svg :target: https://pypi.python.org/pypi/pytile
.. image:: https://img.shields.io/pypi/l/pytile.svg :target: https://github.com/bachya/pytile/blob/master/LICENSE
.. image:: https://codecov.io/gh/bachya/pytile/branch/master/graph/badge.svg :target: https://codecov.io/gh/bachya/pytile
.. image:: https://api.codeclimate.com/v1/badges/71eb642c735e33adcdfc/maintainability :target: https://codeclimate.com/github/bachya/pytile/maintainability
.. image:: https://img.shields.io/badge/SayThanks-!-1EAEDB.svg :target: https://saythanks.io/to/bachya
pytile is a simple Python library for retrieving information on
Tile® Bluetooth trackers <https://www.thetileapp.com/en-us/>_
(including last location and more).
This library is built on an unpublished, unofficial Tile API; it may alter or cease operation at any point.
📡 PLEASE READ: 1.0.0 and Beyond
Version 1.0.0 of pytile makes several breaking, but necessary changes:
- Moves the underlying library from
Requests <http://docs.python-requests.org/en/master/>_ toaiohttp <https://aiohttp.readthedocs.io/en/stable/>_ - Changes the entire library to use :code:
asyncio - Makes 3.5 the minimum version of Python required
If you wish to continue using the previous, synchronous version of pytile, make sure to pin version 1.1.2.
📡 Installation
.. code-block:: bash
$ pip install pytile
📡 Usage
.. code-block:: python
import pytile
pytile starts within an
aiohttp <https://aiohttp.readthedocs.io/en/stable/>_ :code:ClientSession:
.. code-block:: python
import asyncio
from aiohttp import ClientSession
from pytile import Client
async def main() -> None: """Create the aiohttp session and run the example.""" async with ClientSession() as websession: await run(websession)
async def run(websession): """Run.""" # YOUR CODE HERE
asyncio.get_event_loop().run_until_complete(main())
Create a client and initialize it:
.. code-block:: python
client = pytile.Client('', '<TILE_PASSWORD>', websession) await client.async_init()
Then, get to it!
.. code-block:: python
Get all Tiles associated with an account:
await client.tiles.all()
📡 Contributing
#. Check for open features/bugs <https://github.com/bachya/pytile/issues>_
or initiate a discussion on one <https://github.com/bachya/pytile/issues/new>.
#. Fork the repository <https://github.com/bachya/pytile/fork>.
#. Install the dev environment: :code:make init.
#. Enter the virtual environment: :code:pipenv shell
#. Code your new feature or bug fix.
#. Write a test that covers your new functionality.
#. Run tests: :code:make test
#. Build new docs: :code:make docs
#. Add yourself to AUTHORS.rst.
#. Submit a pull request!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytile-2.0.2.tar.gz.
File metadata
- Download URL: pytile-2.0.2.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07f2818b6cf29511b5888afaf33a2515ebc63a2247fe8a60610ef63ca373f1f6
|
|
| MD5 |
e55f034c51cb2a4efb853f5718c1c9c8
|
|
| BLAKE2b-256 |
643e2f470eeef593b48880f11836c99a3756ef834b4626646728dd540fc16e0f
|
File details
Details for the file pytile-2.0.2-py2-none-any.whl.
File metadata
- Download URL: pytile-2.0.2-py2-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
152478381717be621b65c64e914517e84d0d08704d92cc0d594e54c0c8809132
|
|
| MD5 |
9e1b27accc1756d1eb444ef32fdf55d0
|
|
| BLAKE2b-256 |
748be0f88c721843d2e7ae700002ca82d4ca49835faf2cc8b67b199bd821eb11
|