{"id":18331970,"url":"https://github.com/rdsq/pypi-js","last_synced_at":"2026-05-02T02:38:31.780Z","repository":{"id":252781469,"uuid":"841438454","full_name":"rdsq/pypi-js","owner":"rdsq","description":"PyPI API wrapper for JavaScript","archived":false,"fork":false,"pushed_at":"2024-09-30T11:39:12.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T11:16:48.927Z","etag":null,"topics":["javascript","pypi","typescript"],"latest_commit_sha":null,"homepage":"https://jsr.io/@rdsq/pypi","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rdsq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-12T12:09:15.000Z","updated_at":"2024-11-02T21:51:49.000Z","dependencies_parsed_at":"2024-11-05T19:58:33.850Z","dependency_job_id":null,"html_url":"https://github.com/rdsq/pypi-js","commit_stats":null,"previous_names":["rdsq/pypi-js"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdsq%2Fpypi-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdsq%2Fpypi-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdsq%2Fpypi-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdsq%2Fpypi-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rdsq","download_url":"https://codeload.github.com/rdsq/pypi-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248087447,"owners_count":21045522,"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":["javascript","pypi","typescript"],"created_at":"2024-11-05T19:36:36.614Z","updated_at":"2026-05-02T02:38:31.746Z","avatar_url":"https://github.com/rdsq.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyPI JS Package\n\nThis is an API wrapper for the [PyPI API](https://warehouse.pypa.io/index.html)\n\n## Iterate\n\n`iterate` is a method to iterate all packages in the PyPI registry\n\n```ts\nimport * as pypi from '@rdsq/pypi';\n\nfor (const packageName of await pypi.iterate()) {\n    console.log(packageName); // a lot\n}\n```\n\n## All\n\n`all` method returns all packages in the PyPI registry as a list of strings. It\nis often more efficient to use the `iterate` method\n\n```ts\nimport * as pypi from '@rdsq/pypi';\n\nconst packages = await pypi.all();\n\nconsole.log(packages[0]);\n// should be \"0\"\n```\n\n## Get Package\n\n`getPackage` is a method to get data about any package in the PyPI registry\n\n```ts\nimport * as pypi from '@rdsq/pypi';\n\nconsole.log(await pypi.getPackage('django'));\n```\n\n## Stats\n\n`stats` is a method for getting stats of the PyPI registry. Has only two fields:\n`top_packages` and `total_packages_size`\n\n```ts\nimport * as pypi from '@rdsq/pypi';\n\nconst stats = await pypi.stats();\n\nconsole.log('Total packages size in bytes:', stats.total_packages_size);\n\nconst top1 = Object.keys(stats.top_packages)[0];\n\nconsole.log('Top 1 package:', top1);\nconsole.log('Its size:', stats.top_packages[top1].size);\n```\n\n## Types\n\nThis package also features two types:\n\n- `PypiPackage` for the `getPackage` method\n- `PypiStats` for the `stats` method\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdsq%2Fpypi-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frdsq%2Fpypi-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdsq%2Fpypi-js/lists"}