Skip to main content

Debian APT Repository Packages Parser

Test Python Module PythonVersion PythonVersion


This only supports Python 3.

A simple pure-python module to parse RFC822-like Debain data formats.

This can include:

  • Packages Files
  • Control Files
  • Sources
  • Changes

Installation

  • Latest stable build from master (PyPi)
    • pip install debian_packages_parser
      
  • Latest development build
    • Use the provided .whl files.

Usage

Packages File

Package: com.spark.aionwidgets.weather
Name: Weather Aion Widget
Depends: mobilesubstrate, com.spark.Aion
Architecture: iphoneos-arm
Description: Weather Aion widget
Maintainer: Spark
Author: Spark
Section: Aion Widgets
Version: 1.0.0
Installed-Size: 136
SHA256: 6dcb8858474a16b90098a5b5bcb083e9876993c9b6f82b4fbcbe80c012e07369
SHA1: 53cd05fabc299d03b667595a6477bb507f89b96e
MD5sum: 39541c71228533fcd02a29f380c9c598
Depiction: https://www.sparkdev.me/package/com.spark.aionwidgets.weather
SileoDepiction: https://www.sparkdev.me/sileo/com.spark.aionwidgets.weather
Size: 6784
Filename: download/com.spark.aionwidgets.weather/1.0.0.deb
Icon: https://sparkdev.me/package-logo/com.spark.aionwidgets.weather
Tag: purpose::extension

Package: com.spark.airdropconfirm
Name: AirDropConfirm
Depends: mobilesubstrate
Architecture: iphoneos-arm
Description: An awesome MobileSubstrate tweak!
Maintainer: Spark
Author: Spark
Section: Tweaks
Version: 1.0.0
Installed-Size: 200
SHA256: 77cae709321740627124780ef5633ec322c9ba85f2d76e5956c75d8d92f8417a
SHA1: 44af8ad9d78874702772a158b199aaedb8314fb4
MD5sum: 7c9772f33ca571b8512f842100ceb6da
Depiction: https://www.sparkdev.me/package/com.spark.airdropconfirm
SileoDepiction: https://www.sparkdev.me/sileo/com.spark.airdropconfirm
Size: 8760
Filename: download/com.spark.airdropconfirm/1.0.0.deb
Icon: https://sparkdev.me/package-logo/com.spark.airdropconfirm
Tag: purpose::extension

Code

from debian_package_parse import PackagesParser

sample_packages_file = open("Packages", "r").read()

parser = PackagesParser(sample_pacakges_file)
data = parser.parse()
[
    [
        {
            "tag": "Package",
            "value": "com.spark.aionwidgets.weather"
        },
        {
            "tag": "Name",
            "value": "Weather Aion Widget"
        },
        {
            "tag": "Depends",
            "value": "mobilesubstrate, com.spark.Aion"
        },
        {
            "tag": "Architecture",
            "value": "iphoneos-arm"
        },
        {
            "tag": "Description",
            "value": "Weather Aion widget"
        },
        {
            "tag": "Maintainer",
            "value": "Spark"
        },
        {
            "tag": "Author",
            "value": "Spark"
        },
        {
            "tag": "Section",
            "value": "Aion Widgets"
        },
        {
            "tag": "Version",
            "value": "1.0.0"
        },
        {
            "tag": "Installed-Size",
            "value": "136"
        },
        {
            "tag": "SHA256",
            "value": "6dcb8858474a16b90098a5b5bcb083e9876993c9b6f82b4fbcbe80c012e07369"
        },
        {
            "tag": "SHA1",
            "value": "53cd05fabc299d03b667595a6477bb507f89b96e"
        },
        {
            "tag": "MD5sum",
            "value": "39541c71228533fcd02a29f380c9c598"
        },
        {
            "tag": "Depiction",
            "value": "https://www.sparkdev.me/package/com.spark.aionwidgets.weather"
        },
        {
            "tag": "SileoDepiction",
            "value": "https://www.sparkdev.me/sileo/com.spark.aionwidgets.weather"
        },
        {
            "tag": "Size",
            "value": "6784"
        },
        {
            "tag": "Filename",
            "value": "download/com.spark.aionwidgets.weather/1.0.0.deb"
        },
        {
            "tag": "Icon",
            "value": "https://sparkdev.me/package-logo/com.spark.aionwidgets.weather"
        },
        {
            "tag": "Tag",
            "value": "purpose::extension"
        }
    ],
    [
        {
            "tag": "Package",
            "value": "com.spark.airdropconfirm"
        },
        {
            "tag": "Name",
            "value": "AirDropConfirm"
        },
        {
            "tag": "Depends",
            "value": "mobilesubstrate"
        },
        {
            "tag": "Architecture",
            "value": "iphoneos-arm"
        },
        {
            "tag": "Description",
            "value": "An awesome MobileSubstrate tweak!"
        },
        {
            "tag": "Maintainer",
            "value": "Spark"
        },
        {
            "tag": "Author",
            "value": "Spark"
        },
        {
            "tag": "Section",
            "value": "Tweaks"
        },
        {
            "tag": "Version",
            "value": "1.0.0"
        },
        {
            "tag": "Installed-Size",
            "value": "200"
        },
        {
            "tag": "SHA256",
            "value": "77cae709321740627124780ef5633ec322c9ba85f2d76e5956c75d8d92f8417a"
        },
        {
            "tag": "SHA1",
            "value": "44af8ad9d78874702772a158b199aaedb8314fb4"
        },
        {
            "tag": "MD5sum",
            "value": "7c9772f33ca571b8512f842100ceb6da"
        },
        {
            "tag": "Depiction",
            "value": "https://www.sparkdev.me/package/com.spark.airdropconfirm"
        },
        {
            "tag": "SileoDepiction",
            "value": "https://www.sparkdev.me/sileo/com.spark.airdropconfirm"
        },
        {
            "tag": "Size",
            "value": "8760"
        },
        {
            "tag": "Filename",
            "value": "download/com.spark.airdropconfirm/1.0.0.deb"
        },
        {
            "tag": "Icon",
            "value": "https://sparkdev.me/package-logo/com.spark.airdropconfirm"
        },
        {
            "tag": "Tag",
            "value": "purpose::extension"
        }
    ]
]

Should I use This?

It depends, if you need an a simple module to read and act upon RFC822-like Debain data formats, this might be a good alternative as compared to python-debian pacakge.

If you need manuiplate the data, or need more extensibility. It's probably best not to use this.

This module will not "verify" if the file provided is valid. Meaning it can fail catastrophically if invalid. Please ensure verification of the data before..


Development

All PRs are welcome. Please remember to use black formatting when opening.

Metadata

Release files for debian-parser 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for debian-parser 0.1.2
File Size Uploaded Provenance Actions
debian_parser-0.1.2.tar.gz 4.9 kB Without provenance Details for debian_parser-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for debian-parser 0.1.2
File Interpreter ABI Platform Actions
debian_parser-0.1.2-py3-none-any.whl Python 3 none any Details for debian_parser-0.1.2-py3-none-any.whl

Total release size: 21.8 kB

Release files / debian_parser-0.1.2.tar.gz

Download URL debian_parser-0.1.2.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
618252f70eac9c3911567d87c740916f9e04156fe4cbd0bf8838178b63d68cfb
BLAKE2b-256 checksum
How to use checksums
a36a118d92d83bbae6e2f99b0324478b23123467432e867da03b447c9c64c597
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5

Release files / debian_parser-0.1.2-py3-none-any.whl

Download URL debian_parser-0.1.2-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b4628985eabc133472dd4d387381e9c22a62d3ade500d90ba5e119801c6ce6f
BLAKE2b-256 checksum
How to use checksums
fc96a65fe9333efc45c7f2dfd27d1a0fca0d02ed52f433e97b088c4cc68895a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5

Security for debian-parser 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page