Skip to main content

Get metadata from DHT network. A BEP-9 implementation on Python 3.5+

Usage

import asyncio
from mala import get_metadata

loop = asyncio.get_event_loop()
metainfo = loop.run_until_complete(get_metadata(
    'infohash', 'ip', 'port', loop=self.loop
)

Or, use with Maga

from maga import Maga
from mala import get_metadata


class Crawler(Maga):
    async def handle_get_peers(self, infohash, addr):
        pass

    async def handle_announce_peer(self, infohash, addr, peer_addr):
        metainfo = await get_metadata(
            infohash, peer_addr[0], peer_addr[1], loop=self.loop
        )

crawler = Crawler()
crawler.run(port=0)

Download files

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

Source Distributions

Mala-0.1.0.zip (6.7 kB view details)

Uploaded Source

Mala-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

Mala-0.1.0-py2.py3-none-any.whl (4.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file Mala-0.1.0.zip.

File metadata

  • Download URL: Mala-0.1.0.zip
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Mala-0.1.0.zip
Algorithm Hash digest
SHA256 23397c02f3d41dfd9f50198891054ac575766d57663e43fee20e5636955733b8
MD5 8fd7ffaa0dd541813917e6bed05ae7be
BLAKE2b-256 6e1180ffd26f0384a4384f85ed0e90bad748afe2aee74f64a44d85712e4c51ef

See more details on using hashes here.

File details

Details for the file Mala-0.1.0.tar.gz.

File metadata

  • Download URL: Mala-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Mala-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5ece2173ce3b163aa0bd37525bcc29742a66d7266b9781fd3cc64d5321888f51
MD5 ad42f9b11863aabd88288ad689123fdd
BLAKE2b-256 d060634bba84ba55b468f0eeb278740eef854ef8b7a48ee212987b6f5a390e1e

See more details on using hashes here.

File details

Details for the file Mala-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for Mala-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ed5bc0130ce6374f8ef091f216800ac735bcb93d9ee115f7d256f8f4f0e599c2
MD5 df017d1f2e8cb06e0e1f2a6dc6e2fea8
BLAKE2b-256 97a4ac11e769ae60393618fb0095bd9e1a9a1f832acff016415aecc70be95729

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

3 files

Supported by

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