Skip to main content

An RFC 2622 conformant Routing Policy Specification Language (RPSL) parser with a focus on speed and correctness.

Project description

rpsl-parser


An RFC 2622 conformant Routing Policy Specification Language (RPSL) parser with a focus on speed and correctness. It is written in Rust and extensively leverages zero-copy, outperforming other parsers by a factor of 33-60x. To ensure robust parsing of any valid RPSL input, an exhaustive suite of property based tests is used.

[!WARNING] This project is still in early stages of development and its API is not yet stable.

Examples

let role_acme = "
role:        ACME Company
address:     Packet Street 6
address:     128 Series of Tubes
address:     Internet
email:       rpsl-parser@github.com
nic-hdl:     RPSL1-RIPE
source:      RIPE
";
let parsed = rpsl_parser::parse_rpsl_object(role_acme).unwrap();
println!("{:#?}", parsed);

Outputs the following object:

Object(
  [
    Attribute {
      name: "role",
      values: [Some("ACME Company",),],
    },
    Attribute {
      name: "address",
      values: [Some("Packet Street 6",),],
    },
    Attribute {
      name: "address",
      values: [Some("128 Series of Tubes",),],
    },
    Attribute {
      name: "address",
      values: [Some("Internet",),],
    },
    Attribute {
      name: "email",
      values: [Some("irrdb@github.com",),],
    },
    Attribute {
      name: "nic-hdl",
      values: [Some("IRRD2-RIPE",),],
    },
    Attribute {
      name: "source",
      values: [Some("RIPE",),],
    },
  ],
)

Project details


Download files

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

Source Distribution

rpsl_parser-0.1.0.tar.gz (80.4 kB view hashes)

Uploaded Source

Built Distributions

rpsl_parser-0.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (189.3 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

rpsl_parser-0.1.0-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl (259.0 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ s390x

rpsl_parser-0.1.0-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (201.1 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ppc64le

rpsl_parser-0.1.0-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (182.3 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARMv7l

rpsl_parser-0.1.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (182.6 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

rpsl_parser-0.1.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl (196.5 kB view hashes)

Uploaded PyPy manylinux: glibc 2.5+ i686

rpsl_parser-0.1.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (189.3 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

rpsl_parser-0.1.0-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl (259.0 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ s390x

rpsl_parser-0.1.0-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (201.1 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ppc64le

rpsl_parser-0.1.0-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (182.3 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARMv7l

rpsl_parser-0.1.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (182.6 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

rpsl_parser-0.1.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl (196.5 kB view hashes)

Uploaded PyPy manylinux: glibc 2.5+ i686

rpsl_parser-0.1.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (189.3 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

rpsl_parser-0.1.0-pp38-pypy38_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl (259.3 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ s390x

rpsl_parser-0.1.0-pp38-pypy38_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (201.1 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ppc64le

rpsl_parser-0.1.0-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (182.3 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARMv7l

rpsl_parser-0.1.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (182.6 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

rpsl_parser-0.1.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl (196.5 kB view hashes)

Uploaded PyPy manylinux: glibc 2.5+ i686

rpsl_parser-0.1.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (190.5 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

rpsl_parser-0.1.0-pp37-pypy37_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl (261.7 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ s390x

rpsl_parser-0.1.0-pp37-pypy37_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (202.8 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ppc64le

rpsl_parser-0.1.0-pp37-pypy37_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (184.1 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARMv7l

rpsl_parser-0.1.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (183.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

rpsl_parser-0.1.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl (197.8 kB view hashes)

Uploaded PyPy manylinux: glibc 2.5+ i686

rpsl_parser-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (188.9 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

rpsl_parser-0.1.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl (251.4 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ s390x

rpsl_parser-0.1.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (200.1 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ppc64le

rpsl_parser-0.1.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (181.8 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARMv7l

rpsl_parser-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (181.8 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

rpsl_parser-0.1.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl (195.7 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.5+ i686

rpsl_parser-0.1.0-cp311-none-win_amd64.whl (115.9 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

rpsl_parser-0.1.0-cp311-none-win32.whl (109.6 kB view hashes)

Uploaded CPython 3.11 Windows x86

rpsl_parser-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (188.9 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

rpsl_parser-0.1.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl (258.5 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ s390x

rpsl_parser-0.1.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (200.8 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ppc64le

rpsl_parser-0.1.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (181.9 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARMv7l

rpsl_parser-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (182.4 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

rpsl_parser-0.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl (196.1 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.5+ i686

rpsl_parser-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (173.1 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

rpsl_parser-0.1.0-cp311-cp311-macosx_10_7_x86_64.whl (183.3 kB view hashes)

Uploaded CPython 3.11 macOS 10.7+ x86-64

rpsl_parser-0.1.0-cp310-none-win_amd64.whl (115.9 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

rpsl_parser-0.1.0-cp310-none-win32.whl (109.6 kB view hashes)

Uploaded CPython 3.10 Windows x86

rpsl_parser-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (189.0 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

rpsl_parser-0.1.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl (258.5 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ s390x

rpsl_parser-0.1.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (200.8 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ppc64le

rpsl_parser-0.1.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (181.9 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARMv7l

rpsl_parser-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (182.4 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

rpsl_parser-0.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl (196.1 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.5+ i686

rpsl_parser-0.1.0-cp310-cp310-macosx_11_0_arm64.whl (173.0 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

rpsl_parser-0.1.0-cp310-cp310-macosx_10_7_x86_64.whl (183.3 kB view hashes)

Uploaded CPython 3.10 macOS 10.7+ x86-64

rpsl_parser-0.1.0-cp39-none-win_amd64.whl (115.9 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

rpsl_parser-0.1.0-cp39-none-win32.whl (109.6 kB view hashes)

Uploaded CPython 3.9 Windows x86

rpsl_parser-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (188.9 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

rpsl_parser-0.1.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl (258.5 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ s390x

rpsl_parser-0.1.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (200.8 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ppc64le

rpsl_parser-0.1.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (181.9 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARMv7l

rpsl_parser-0.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (182.4 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

rpsl_parser-0.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl (196.1 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.5+ i686

rpsl_parser-0.1.0-cp38-none-win_amd64.whl (116.2 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

rpsl_parser-0.1.0-cp38-none-win32.whl (109.8 kB view hashes)

Uploaded CPython 3.8 Windows x86

rpsl_parser-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (188.9 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

rpsl_parser-0.1.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl (258.7 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ s390x

rpsl_parser-0.1.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (200.8 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ppc64le

rpsl_parser-0.1.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (182.0 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARMv7l

rpsl_parser-0.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (182.4 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

rpsl_parser-0.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl (196.0 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.5+ i686

rpsl_parser-0.1.0-cp37-none-win_amd64.whl (116.2 kB view hashes)

Uploaded CPython 3.7 Windows x86-64

rpsl_parser-0.1.0-cp37-none-win32.whl (109.7 kB view hashes)

Uploaded CPython 3.7 Windows x86

rpsl_parser-0.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (188.9 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

rpsl_parser-0.1.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl (258.7 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ s390x

rpsl_parser-0.1.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (200.8 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ppc64le

rpsl_parser-0.1.0-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (182.0 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARMv7l

rpsl_parser-0.1.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (182.4 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

rpsl_parser-0.1.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl (196.0 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.5+ i686

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page