Skip to main content

Minimalistic asyncio-based Tor Controller

Project description

Minimalistic Tor Controller

Minimalistic asyncio-based Tor controller.

How to use:

    from mintc import TorController

    tc = TorController('127.0.0.1:9051')
    try:
        await tc.start()
        await tc.authenticate('password')
        async for circuit in tc.get_circuits():
            print(circuit)
    finally:
        await tc.stop()

Or:

    async with TorController('127.0.0.1:9051') as tc:
        await tc.authenticate('password')
        async for circuit in tc.get_circuits():
            print(circuit)

The format of control port argument passed to the constructor is identical to ControlPort from torrc.

Only small subset of commands is implemented so far.

This controller neither does nor will implement auto reconnect. It's the user's responsibility to catch any exceptions and re-run the entire async with TorController... code block or restart the controller with tc.restart() and start over again from tc.authenticate().

All response parsing is very minimalistic. E.g. date/time strings are not parsed.

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

mintc-0.0.4.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mintc-0.0.4-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file mintc-0.0.4.tar.gz.

File metadata

  • Download URL: mintc-0.0.4.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for mintc-0.0.4.tar.gz
Algorithm Hash digest
SHA256 c19266903a1b55133fc166588faac1272aa74623bb95b2c88f1e93fc1df1715e
MD5 674210e25f8d8dbe6dcd958b414b7388
BLAKE2b-256 1c71da3ff3326a495304abae3f1bedf8c9ec31b61143da3c8ab7df2f76997b78

See more details on using hashes here.

File details

Details for the file mintc-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: mintc-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for mintc-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7f3aa22cbd0cc123e8856f1efaac7ac222419660b443ce91e6f45ef7e5653072
MD5 ba4bf19f3f12d4192852851ee6217566
BLAKE2b-256 f3c22886dad954be7f70051ff6376c8c0ebc2299c80756cdf23666a017e212c6

See more details on using hashes here.

Supported by

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