Metadata-Version: 2.1
Name: czpubtran
Version: 0.1.2
Summary: Calling CHAPS REST API to get information about public transit in CZ
Home-page: https://github.com/bruxy70/CzPubTran
Author: Václav Chaloupka
Author-email: vasek.chaloupka@hotmail.com
License: MIT
Description: # CzPubTran
        A Python package to rertrieve realtime information about public transit in CZ by calling CHAPS REST API.
        
        Main purpose at the moment is to feed a sensor in Home-Assistant
        
        # Install
        
        pip install czpubtran
        
        # Example usage
        
        ```
        import asyncio
        import aiohttp
        import logging
        from czpubtran.api import czpubtran
        
        logging.basicConfig(level=logging.DEBUG)
        
        async def test():
            session=aiohttp.ClientSession(raise_for_status=True)
            bus = czpubtran(session,'')
            await bus.async_find_connection('Cernosice, zel.zast.','Florenc','ABCz')
            print(f'Connection from {bus.origin} to {bus.destination} using timetable{bus.combination_id}')
            print('------------------------------------------------')
            print(f'Departure: {bus.departure}')
            print(f'Duration: {bus.duration}')
            print('Connections:')
            for connection in bus.connections:
                print(f"line {connection['line']} at {connection['depTime']} from {connection['depStation']} - > {connection['arrTime']} to {connection['arrStation']} (delay: {connection['delay']} min)")
        
        asyncio.run(test())
        ```
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Requires-Python: >=3.5.0
Description-Content-Type: text/markdown
