{"id":21969566,"url":"https://github.com/cinderblock/python-rencode","last_synced_at":"2026-04-12T21:45:52.035Z","repository":{"id":33280227,"uuid":"157433672","full_name":"cinderblock/python-rencode","owner":"cinderblock","description":"Arbitrary data encoder/decoder that matches python rencode","archived":false,"fork":false,"pushed_at":"2023-01-04T21:51:32.000Z","size":1312,"stargazers_count":0,"open_issues_count":9,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T12:36:02.226Z","etag":null,"topics":["arbitrary-data-encoder","deluge","deluge-daemon","javascript","javascript-library","matches-python","python-rencode","serialization"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cinderblock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-13T19:22:19.000Z","updated_at":"2021-05-10T19:37:16.000Z","dependencies_parsed_at":"2023-01-15T00:21:10.477Z","dependency_job_id":null,"html_url":"https://github.com/cinderblock/python-rencode","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinderblock%2Fpython-rencode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinderblock%2Fpython-rencode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinderblock%2Fpython-rencode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinderblock%2Fpython-rencode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cinderblock","download_url":"https://codeload.github.com/cinderblock/python-rencode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245027736,"owners_count":20549377,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arbitrary-data-encoder","deluge","deluge-daemon","javascript","javascript-library","matches-python","python-rencode","serialization"],"created_at":"2024-11-29T14:22:21.123Z","updated_at":"2026-04-12T21:45:46.994Z","avatar_url":"https://github.com/cinderblock.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# python-rencode\n\nArbitrary data encoder/decoder that matches python [`rencode`](https://github.com/aresch/rencode).\n\n[![](https://github.com/cinderblock/python-rencode/workflows/Build%2C%20Test%2C%20and%20Publish/badge.svg)](https://github.com/cinderblock/python-rencode/actions)\n[![Coverage Status](https://coveralls.io/repos/github/cinderblock/python-rencode/badge.svg?branch=master)](https://coveralls.io/github/cinderblock/python-rencode?branch=master)\n\n## Usage\n\n```bash\nnpm install python-rencode\n```\n\n```js\nconst { encode, decode } = require('python-rencode');\n\n// Could be basically any data that would convert correctly to JSON\nconst thing = 1;\n\n// Encode some data into a Buffer\nconst encoded = encode(thing);\n\n// Decode a Buffer into some data\nconst decoded = decode(encoded);\n```\n\n## Install as Git Dependency\n\nIf you'd rather not use the versions published to npm, you can easily install from github directly with:\n\n```bash\nnpm install cinderblock/python-rencode         # Defaults to master\nnpm install cinderblock/python-rencode#branch  # Use a named branch\nnpm install cinderblock/python-rencode#v1.4.0  # Use a tagged version\nnpm install cinderblock/python-rencode#hash    # Use a hash directly\n```\n\n## Change Log\n\n### v1.4.0\n\n**`v1.4.0` slightly changed the API.**\n\n- `undefined` has been replaced with `null`.\n- `undefined` is no longer allowed as a value and will now throw.\n  _This behavior might change in the future. Make an issue to discuss._\n\n### v1.3.0\n\n- Export data type: `RencodableData`\n\n### v1.2.0\n\n- Add TypeScript Support\n\n### v1.1.0\n\n- Decode UTF8 by default\n\n\u003c!-- NOPUBLISH --\u003e\n\n## Development\n\n### Setup\n\n```bash\nyarn setup\n```\n\n### Testing\n\nRun the jest test suite against TypeScript sources.\n\n```bash\nyarn test\nyarn test --coverage             # Generate coverage reports\nyarn test --watchAll             # Watch mode\nyarn test --watchAll --coverage  # Combined\n```\n\nThe test suite can also be run against any arbitrary copy of the library by setting the environment variable `JEST_IMPORT_OVERRIDE`.\nThis is useful for testing against the compiled JavaScript `dist` folder or a git dependency.\nBoth of these use cases are tested automatically in Github Actions.\n\n### Formatting\n\nEnsure code is formatted with our style.\n\n```bash\nyarn format --check\nyarn format --write\n```\n\nThis is generally unnecessary with \"Format On Save\" features of most editors.\nVS Code should work automatically because of workspace settings.\n\n#### REPL\n\nStart a repl with functions `encode` and `decode` loaded into the running context.\n\n```bash\nyarn repl\n```\n\n### Versioning\n\nJust run any single npm/yarn version command.\n\n```bash\n# Any of these work. Other variations work too.\nyarn version\nyarn version --minor\nnpm version major\n```\n\n### Publishing\n\nVersion bumps trigger a publish to npm on Github Actions.\n\nWe build a `dist` folder to publish from.\nThe published version has a simplified `README.md` and `package.json`.\n\n### Build\n\nWe build a `dist` folder to actually publish from.\n\n```bash\nyarn build\n```\n\nThis builds the TypeScript, copies this README with development sections removed, and copies a simplified version of the package.json for Npm.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcinderblock%2Fpython-rencode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcinderblock%2Fpython-rencode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcinderblock%2Fpython-rencode/lists"}