Giter Club home page Giter Club logo

bencode-py's Introduction

A fast and correct bencode serialize/deserialize library

PyPI tests PyPI - Python Version Codecov branch

This library is compiled with mypy on cpython, and pure python on pypy.

install

pip install bencode2

basic usage

import bencode2


assert bencode2.bdecode(b"d4:spaml1:a1:bee") == {b"spam": [b"a", b"b"]}

# If you want to decode dict with str keys:
# Note: this doesn't work with BitTorrent V2 torrent file.
assert bencode2.bdecode(b"d4:spaml1:a1:bee", str_key=True) == {"spam": [b"a", b"b"]}

assert bencode2.bencode({'hello': 'world'}) == b'd5:hello5:worlde'

bencode-py's People

Contributors

jrenaud90 avatar renovate[bot] avatar trim21 avatar

Watchers

 avatar  avatar

bencode-py's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.4.5

Detected dependencies

github-actions
.github/workflows/_build_wheels.yaml
  • actions/checkout v4
  • actions/upload-artifact v4
  • docker/setup-qemu-action v3
  • actions/checkout v4
  • actions/cache v4
  • pypa/cibuildwheel v2.18.1
  • actions/upload-artifact v4
  • actions/upload-artifact v4
  • actions/download-artifact v4
.github/workflows/lint.yaml
  • actions/checkout v4
  • actions/setup-python v5
  • liskin/gh-problem-matcher-wrap v3
  • actions/checkout v4
  • actions/setup-python v5
.github/workflows/release.yaml
  • actions/download-artifact v4
  • actions/setup-python v5
.github/workflows/tests.yaml
  • actions/checkout v4
  • actions/setup-python v5
  • codecov/codecov-action v4
  • actions/checkout v4
  • actions/setup-python v5
  • codecov/codecov-action v4
pep621
pyproject.toml
  • testing/pytest ==8.2.1
  • testing/pytest-cov ==5.0.0
  • testing/pytest-github-actions-annotate-failures ==0.2.0
  • mypy/mypy ==1.10.0
  • hatchling >=1.20.0
pre-commit
.pre-commit-config.yaml
  • pre-commit/pre-commit-hooks v4.6.0
  • astral-sh/ruff-pre-commit v0.4.4
  • psf/black 24.4.2

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.