Skip to main content

A Python API wrapper for Tehzor API

Project description

logo Tehzor

PyPI - Version

Обертка над API системы Техзор на python (async/await)

Официальная документация https://api.tehzor.ru/docs

Установка

pip install tehzor

Примеры

Обновления параметров квартир (площадь, плащадь БТИ, тип отделки ...). Предварительно необходимо знать id квартир и id типа отделки:

from tehzor import TehzorAPI
from excel_apartments import result_flats


API_KEY = "00000000-0000-0000-0000-000000000000"
USER_ID = "123d7cdfc7ea123d123456ab"


async def main():     
    thz = await TehzorAPI.create(api_key=API_KEY, user_id=USER_ID)
    
    async with asyncio.TaskGroup() as tg:
        for id, data in result_flats.items():
            tg.create_task(thz.update_spaces(id, data.model_dump_json()))

    await thz.session_close()


if __name__ == "__main__":    
    asyncio.run(main())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tehzor-0.0.3.tar.gz (6.2 kB view hashes)

Uploaded Source

Built Distribution

tehzor-0.0.3-py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page