Metadata-Version: 2.1
Name: tiktok-signature
Version: 1.3
Summary: Some tool
Project-URL: Homepage, https://github.com/sheldygg/tiktok-signature
Author: sheldy
License-Expression: MIT
License-File: LICENSE
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Dist: playwright
Requires-Dist: pycryptodome
Provides-Extra: server
Requires-Dist: aiohttp; extra == 'server'
Description-Content-Type: text/x-rst

####################
tiktok-signature
####################

.. image:: https://img.shields.io/pypi/v/tiktok-signature?color=blue
    :target: https://pypi.python.org/pypi/tiktok-signature
    :alt: PyPi Package Version

.. image:: https://img.shields.io/pypi/dm/tiktok-signature?color=blue
    :target: https://pypi.python.org/pypi/tiktok-signature
    :alt: Downloads

Server
======

.. code-block:: python

   import asyncio

   from playwright.async_api import async_playwright
   from tiktok_signature.server import make_server


   async def main():
       async with async_playwright() as playwright:
           server = await make_server(playwright=playwright, host="127.0.0.1", port=8002)
           await server.start()
           await asyncio.Event().wait()

   asyncio.run(main())


As package
==========
.. code-block:: python

    import asyncio

    from tiktok_signature import Signer
    from playwright.async_api import async_playwright


    async def main():
        async with async_playwright() as playwright:
            signer = Signer(playwright=playwright)
            await signer.init()
            await signer.sign("url")

    asyncio.run(main())

Docker
======
You can build image yourself

.. code-block:: rst

    docker build . -t tiktok-signature

Or start with the second command and use the ready image

.. code-block:: rst

    docker run --name=tiktok-signature --restart=always -p 8002:8002 -e port=8002 sheldygg/tiktok-signature