ftlbgp


Nameftlbgp JSON
Version 1.0.3 PyPI version JSON
download
home_pageNone
SummaryA Python parser for BGP data in MRT or looking glass format
upload_time2024-10-30 22:36:46
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseNone
keywords bgp mrt parser
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ftlbgp

A Python parser for BGP data in MRT or looking glass format.

### Key features

- Support for all MRT entry types, BGP messages, and BGP attributes
- Customizable record and attribute types (no parsing of unneeded data)
- Programmatic data access with optional CSV and JSON serialization
- Raw values and human-readable output (e.g. integers vs. strings)
- Rapid prototyping (namedtuple) and high-performance mode (tuple)
- Context manager with built-in statistics and flexible error handling
- Zero-copy operations on all data items (as fast as it gets in Python)

## Compatibility

This package is compatible with `python3.6` and `pypy3.6-v7.0.0` or greater.

## Installation

Run `pip install ftlbgp` or

```
~$ git clone https://github.com/leitwert-net/ftlbgp.git`
~$ cd ftlbgp.git/src
```

to download and run the source code manually.

## Usage

### Parsing MRT files

```
~$ python3 -m ftlbgp -h
usage: python3 -m ftlbgp [-h] [--pkg-help] [--json] <FILE> [<FILE> ...]

ftlbgp [v1.0.3] - Parse BGP archives in MRT or looking glass format

positional arguments:
  <FILE>      input file with BGP data (supports bz2/gz)

optional arguments:
  -h, --help  show this help message and exit
  --pkg-help  show package help for BgpParser usage
  --json      output BGP records in JSON format

```

### Programmatic use

```python
# Import parser
from ftlbgp import BgpParser

# Prepare input file
filename = ...

# Parse default records and attributes
with BgpParser() as parse:
    for record in parse(filename):
        print(record)
```

## Customization

```python
# Parse all records
with BgpParser(bgp_records=BgpParser.bgp.records.ALL) as parse:
    for record in parse(filename):
        print(record)

# Parse specific records (route and error)
with BgpParser(bgp_records=BgpParser.bgp.records.route | BgpParser.bgp.records.error) as parse:
    for record in parse(filename):
        print(record)

# Parse all route attributes
with BgpParser(bgp_route=BgpParser.bgp.route.ALL) as parse:
    for record in parse(filename):
        print(record)

# Parse specific route attributes (default and local_pref)
with BgpParser(bgp_route=BgpParser.bgp.route.DEFAULT | BgpParser.bgp.route.local_pref) as parse:
    for record in parse(filename):
        print(record)
```

## Full specification

```
BgpParser()
      
This @FtlParser instance is used to read input files and generate a set of BGP records (Python tuples).
It must be used with a context manager (see sample usage below) and accepts the following arguments.

Keyword arguments:
  named_records     - Return named tuples instead of plain unnamed tuple records. [Default: True]
  serialize         - Convert output records to JSON (if named) or CSV (if unnamed). [Default: False]
  use_cache         - Cache expensive low-entropy values (memory consumption < 1MB). [Default: True]
  raise_on_errors   - Raise exceptions and stop parsing in case of data errors. [Default: False]
  bgp_records       - Select the types of BgpRecord entries to be returned by the parser.
                      Supports bitwise logical operators OR, AND, NOT to specify multiple records.
                      [Default:
                        BgpParser.bgp.records.route |
                        BgpParser.bgp.records.stats |
                        BgpParser.bgp.records.error
                       Available:
                        BgpParser.bgp.records.peer_table
                        BgpParser.bgp.records.state_change
                        BgpParser.bgp.records.keep_alive
                        BgpParser.bgp.records.route_refresh
                        BgpParser.bgp.records.notification
                        BgpParser.bgp.records.open
                        BgpParser.bgp.records.ALL
                        BgpParser.bgp.records.NONE
                        BgpParser.bgp.records.DEFAULT]
  bgp_peer_table    - Select [optionally human-readable] attribute to be included in BgpPeerTableRecord entries.
                      Supports bitwise logical operators (OR/AND/NOT) to specify multiple attributes.
                      [Default:
                        BgpParser.bgp.peer_table[.human].type |
                        BgpParser.bgp.peer_table[.human].peer_protocol |
                        BgpParser.bgp.peer_table[.human].peer_bgp_id |
                        BgpParser.bgp.peer_table[.human].peer_as |
                        BgpParser.bgp.peer_table[.human].peer_ip
                       Available:
                        BgpParser.bgp.peer_table[.human].collector_bgp_id
                        BgpParser.bgp.peer_table[.human].view_name
                        BgpParser.bgp.peer_table[.human].ALL
                        BgpParser.bgp.peer_table[.human].NONE
                        BgpParser.bgp.peer_table[.human].DEFAULT]
  bgp_state_change  - Select [optionally human-readable] attribute to be included in BgpStateChangeRecord entries.
                      Supports bitwise logical operators (OR/AND/NOT) to specify multiple attributes.
                      [Default:
                        BgpParser.bgp.state_change[.human].type |
                        BgpParser.bgp.state_change[.human].timestamp |
                        BgpParser.bgp.state_change[.human].peer_protocol |
                        BgpParser.bgp.state_change[.human].peer_as |
                        BgpParser.bgp.state_change[.human].peer_ip |
                        BgpParser.bgp.state_change[.human].old_state |
                        BgpParser.bgp.state_change[.human].new_state
                       Available:
                        BgpParser.bgp.state_change[.human].ALL
                        BgpParser.bgp.state_change[.human].NONE
                        BgpParser.bgp.state_change[.human].DEFAULT]
  bgp_route         - Select [optionally human-readable] attribute to be included in BgpRouteRecord entries.
                      Supports bitwise logical operators (OR/AND/NOT) to specify multiple attributes.
                      [Default:
                        BgpParser.bgp.route[.human].type |
                        BgpParser.bgp.route[.human].source |
                        BgpParser.bgp.route[.human].sequence |
                        BgpParser.bgp.route[.human].timestamp |
                        BgpParser.bgp.route[.human].peer_protocol |
                        BgpParser.bgp.route[.human].peer_bgp_id |
                        BgpParser.bgp.route[.human].peer_as |
                        BgpParser.bgp.route[.human].peer_ip |
                        BgpParser.bgp.route[.human].nexthop_protocol |
                        BgpParser.bgp.route[.human].nexthop_ip |
                        BgpParser.bgp.route[.human].prefix_protocol |
                        BgpParser.bgp.route[.human].prefix |
                        BgpParser.bgp.route[.human].path_id |
                        BgpParser.bgp.route[.human].aspath |
                        BgpParser.bgp.route[.human].origin |
                        BgpParser.bgp.route[.human].communities |
                        BgpParser.bgp.route[.human].large_communities
                       Available:
                        BgpParser.bgp.route[.human].extended_communities
                        BgpParser.bgp.route[.human].multi_exit_disc
                        BgpParser.bgp.route[.human].atomic_aggregate
                        BgpParser.bgp.route[.human].aggregator_protocol
                        BgpParser.bgp.route[.human].aggregator_as
                        BgpParser.bgp.route[.human].aggregator_ip
                        BgpParser.bgp.route[.human].only_to_customer
                        BgpParser.bgp.route[.human].originator_id
                        BgpParser.bgp.route[.human].cluster_list
                        BgpParser.bgp.route[.human].local_pref
                        BgpParser.bgp.route[.human].attr_set
                        BgpParser.bgp.route[.human].as_pathlimit
                        BgpParser.bgp.route[.human].aigp
                        BgpParser.bgp.route[.human].attrs_unknown
                        BgpParser.bgp.route[.human].ALL
                        BgpParser.bgp.route[.human].NONE
                        BgpParser.bgp.route[.human].DEFAULT]
  bgp_keep_alive    - Select [optionally human-readable] attribute to be included in BgpKeepAliveRecord entries.
                      Supports bitwise logical operators (OR/AND/NOT) to specify multiple attributes.
                      [Default:
                        BgpParser.bgp.keep_alive[.human].type |
                        BgpParser.bgp.keep_alive[.human].timestamp |
                        BgpParser.bgp.keep_alive[.human].peer_protocol |
                        BgpParser.bgp.keep_alive[.human].peer_as |
                        BgpParser.bgp.keep_alive[.human].peer_ip
                       Available:
                        BgpParser.bgp.keep_alive[.human].ALL
                        BgpParser.bgp.keep_alive[.human].NONE
                        BgpParser.bgp.keep_alive[.human].DEFAULT]
  bgp_route_refresh - Select [optionally human-readable] attribute to be included in BgpRouteRefreshRecord entries.
                      Supports bitwise logical operators (OR/AND/NOT) to specify multiple attributes.
                      [Default:
                        BgpParser.bgp.route_refresh[.human].type |
                        BgpParser.bgp.route_refresh[.human].timestamp |
                        BgpParser.bgp.route_refresh[.human].peer_protocol |
                        BgpParser.bgp.route_refresh[.human].peer_as |
                        BgpParser.bgp.route_refresh[.human].peer_ip |
                        BgpParser.bgp.route_refresh[.human].refresh_protocol
                       Available:
                        BgpParser.bgp.route_refresh[.human].ALL
                        BgpParser.bgp.route_refresh[.human].NONE
                        BgpParser.bgp.route_refresh[.human].DEFAULT]
  bgp_notification  - Select [optionally human-readable] attribute to be included in BgpNotificationRecord entries.
                      Supports bitwise logical operators (OR/AND/NOT) to specify multiple attributes.
                      [Default:
                        BgpParser.bgp.notification[.human].type |
                        BgpParser.bgp.notification[.human].timestamp |
                        BgpParser.bgp.notification[.human].peer_protocol |
                        BgpParser.bgp.notification[.human].peer_as |
                        BgpParser.bgp.notification[.human].peer_ip |
                        BgpParser.bgp.notification[.human].error_code |
                        BgpParser.bgp.notification[.human].error_subcode |
                        BgpParser.bgp.notification[.human].data
                       Available:
                        BgpParser.bgp.notification[.human].ALL
                        BgpParser.bgp.notification[.human].NONE
                        BgpParser.bgp.notification[.human].DEFAULT]
  bgp_open          - Select [optionally human-readable] attribute to be included in BgpOpenRecord entries.
                      Supports bitwise logical operators (OR/AND/NOT) to specify multiple attributes.
                      [Default:
                        BgpParser.bgp.open[.human].type |
                        BgpParser.bgp.open[.human].timestamp |
                        BgpParser.bgp.open[.human].peer_protocol |
                        BgpParser.bgp.open[.human].peer_as |
                        BgpParser.bgp.open[.human].peer_ip |
                        BgpParser.bgp.open[.human].version |
                        BgpParser.bgp.open[.human].my_as |
                        BgpParser.bgp.open[.human].hold_time |
                        BgpParser.bgp.open[.human].bgp_id |
                        BgpParser.bgp.open[.human].capabilities
                       Available:
                        BgpParser.bgp.open[.human].params_unknown
                        BgpParser.bgp.open[.human].ALL
                        BgpParser.bgp.open[.human].NONE
                        BgpParser.bgp.open[.human].DEFAULT]
  bgp_stats         - Select [optionally human-readable] attribute to be included in BgpStatsRecord entries.
                      Supports bitwise logical operators (OR/AND/NOT) to specify multiple attributes.
                      [Default:
                        BgpParser.bgp.stats[.human].type |
                        BgpParser.bgp.stats[.human].parser_lifetime |
                        BgpParser.bgp.stats[.human].parser_runtime |
                        BgpParser.bgp.stats[.human].parser_errors |
                        BgpParser.bgp.stats[.human].lgl_runtime |
                        BgpParser.bgp.stats[.human].lgl_entries |
                        BgpParser.bgp.stats[.human].lgl_errors |
                        BgpParser.bgp.stats[.human].mrt_runtime |
                        BgpParser.bgp.stats[.human].mrt_entries |
                        BgpParser.bgp.stats[.human].mrt_errors |
                        BgpParser.bgp.stats[.human].mrt_fixes |
                        BgpParser.bgp.stats[.human].mrt_bgp_entry_types |
                        BgpParser.bgp.stats[.human].mrt_bgp_message_types |
                        BgpParser.bgp.stats[.human].mrt_bgp_attribute_types |
                        BgpParser.bgp.stats[.human].mrt_bgp_capability_types |
                        BgpParser.bgp.stats[.human].bgp_routes_rib_ipv4 |
                        BgpParser.bgp.stats[.human].bgp_routes_rib_ipv6 |
                        BgpParser.bgp.stats[.human].bgp_routes_announce_ipv4 |
                        BgpParser.bgp.stats[.human].bgp_routes_announce_ipv6 |
                        BgpParser.bgp.stats[.human].bgp_routes_withdraw_ipv4 |
                        BgpParser.bgp.stats[.human].bgp_routes_withdraw_ipv6
                       Available:
                        BgpParser.bgp.stats[.human].ALL
                        BgpParser.bgp.stats[.human].NONE
                        BgpParser.bgp.stats[.human].DEFAULT]
  bgp_error         - Select [optionally human-readable] attribute to be included in BgpErrorRecord entries.
                      Supports bitwise logical operators (OR/AND/NOT) to specify multiple attributes.
                      [Default:
                        BgpParser.bgp.error[.human].type |
                        BgpParser.bgp.error[.human].source |
                        BgpParser.bgp.error[.human].scope |
                        BgpParser.bgp.error[.human].record |
                        BgpParser.bgp.error[.human].reason |
                        BgpParser.bgp.error[.human].message |
                        BgpParser.bgp.error[.human].data |
                        BgpParser.bgp.error[.human].trace
                       Available:
                        BgpParser.bgp.error[.human].ALL
                        BgpParser.bgp.error[.human].NONE
                        BgpParser.bgp.error[.human].DEFAULT]

Returns:
  parse(<filename>) - Parse function that accepts a filename as single positional argument and generates
                      all specified BGP records on invocation. Input files can be provided in .bz2 or .gz
                      format. The parse function may be invoked multiple times within a single context.

Raises:
  FtlError          - Generic parser or runtime error.
  FtlFileError      - Failure during access of input file.
  FtlFormatError    - Unexpected format of input file.
  FtlDataError      - Invalid data entry in input file.
```

## Author

Johann SCHLAMP <[schlamp@leitwert.net](mailto:schlamp@leitwert.net)> 

## License

Copyright (C) 2014-2024 Leitwert GmbH

This software is distributed under the terms of the MIT license.    
It can be found in the LICENSE file or at [https://opensource.org/licenses/MIT](https://opensource.org/licenses/MIT).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ftlbgp",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "BGP, MRT, parser",
    "author": null,
    "author_email": "Johann SCHLAMP <schlamp@leitwert.net>",
    "download_url": "https://files.pythonhosted.org/packages/60/af/68b7b49f5f8cfe72bde952d63c61aedeb030adc4c5a8499f6fd1a7bc0bac/ftlbgp-1.0.3.tar.gz",
    "platform": null,
    "description": "# ftlbgp\n\nA Python parser for BGP data in MRT or looking glass format.\n\n### Key features\n\n- Support for all MRT entry types, BGP messages, and BGP attributes\n- Customizable record and attribute types (no parsing of unneeded data)\n- Programmatic data access with optional CSV and JSON serialization\n- Raw values and human-readable output (e.g. integers vs. strings)\n- Rapid prototyping (namedtuple) and high-performance mode (tuple)\n- Context manager with built-in statistics and flexible error handling\n- Zero-copy operations on all data items (as fast as it gets in Python)\n\n## Compatibility\n\nThis package is compatible with `python3.6` and `pypy3.6-v7.0.0` or greater.\n\n## Installation\n\nRun `pip install ftlbgp` or\n\n```\n~$ git clone https://github.com/leitwert-net/ftlbgp.git`\n~$ cd ftlbgp.git/src\n```\n\nto download and run the source code manually.\n\n## Usage\n\n### Parsing MRT files\n\n```\n~$ python3 -m ftlbgp -h\nusage: python3 -m ftlbgp [-h] [--pkg-help] [--json] <FILE> [<FILE> ...]\n\nftlbgp [v1.0.3] - Parse BGP archives in MRT or looking glass format\n\npositional arguments:\n  <FILE>      input file with BGP data (supports bz2/gz)\n\noptional arguments:\n  -h, --help  show this help message and exit\n  --pkg-help  show package help for BgpParser usage\n  --json      output BGP records in JSON format\n\n```\n\n### Programmatic use\n\n```python\n# Import parser\nfrom ftlbgp import BgpParser\n\n# Prepare input file\nfilename = ...\n\n# Parse default records and attributes\nwith BgpParser() as parse:\n    for record in parse(filename):\n        print(record)\n```\n\n## Customization\n\n```python\n# Parse all records\nwith BgpParser(bgp_records=BgpParser.bgp.records.ALL) as parse:\n    for record in parse(filename):\n        print(record)\n\n# Parse specific records (route and error)\nwith BgpParser(bgp_records=BgpParser.bgp.records.route | BgpParser.bgp.records.error) as parse:\n    for record in parse(filename):\n        print(record)\n\n# Parse all route attributes\nwith BgpParser(bgp_route=BgpParser.bgp.route.ALL) as parse:\n    for record in parse(filename):\n        print(record)\n\n# Parse specific route attributes (default and local_pref)\nwith BgpParser(bgp_route=BgpParser.bgp.route.DEFAULT | BgpParser.bgp.route.local_pref) as parse:\n    for record in parse(filename):\n        print(record)\n```\n\n## Full specification\n\n```\nBgpParser()\n      \nThis @FtlParser instance is used to read input files and generate a set of BGP records (Python tuples).\nIt must be used with a context manager (see sample usage below) and accepts the following arguments.\n\nKeyword arguments:\n  named_records     - Return named tuples instead of plain unnamed tuple records. [Default: True]\n  serialize         - Convert output records to JSON (if named) or CSV (if unnamed). [Default: False]\n  use_cache         - Cache expensive low-entropy values (memory consumption < 1MB). [Default: True]\n  raise_on_errors   - Raise exceptions and stop parsing in case of data errors. [Default: False]\n  bgp_records       - Select the types of BgpRecord entries to be returned by the parser.\n                      Supports bitwise logical operators OR, AND, NOT to specify multiple records.\n                      [Default:\n                        BgpParser.bgp.records.route |\n                        BgpParser.bgp.records.stats |\n                        BgpParser.bgp.records.error\n                       Available:\n                        BgpParser.bgp.records.peer_table\n                        BgpParser.bgp.records.state_change\n                        BgpParser.bgp.records.keep_alive\n                        BgpParser.bgp.records.route_refresh\n                        BgpParser.bgp.records.notification\n                        BgpParser.bgp.records.open\n                        BgpParser.bgp.records.ALL\n                        BgpParser.bgp.records.NONE\n                        BgpParser.bgp.records.DEFAULT]\n  bgp_peer_table    - Select [optionally human-readable] attribute to be included in BgpPeerTableRecord entries.\n                      Supports bitwise logical operators (OR/AND/NOT) to specify multiple attributes.\n                      [Default:\n                        BgpParser.bgp.peer_table[.human].type |\n                        BgpParser.bgp.peer_table[.human].peer_protocol |\n                        BgpParser.bgp.peer_table[.human].peer_bgp_id |\n                        BgpParser.bgp.peer_table[.human].peer_as |\n                        BgpParser.bgp.peer_table[.human].peer_ip\n                       Available:\n                        BgpParser.bgp.peer_table[.human].collector_bgp_id\n                        BgpParser.bgp.peer_table[.human].view_name\n                        BgpParser.bgp.peer_table[.human].ALL\n                        BgpParser.bgp.peer_table[.human].NONE\n                        BgpParser.bgp.peer_table[.human].DEFAULT]\n  bgp_state_change  - Select [optionally human-readable] attribute to be included in BgpStateChangeRecord entries.\n                      Supports bitwise logical operators (OR/AND/NOT) to specify multiple attributes.\n                      [Default:\n                        BgpParser.bgp.state_change[.human].type |\n                        BgpParser.bgp.state_change[.human].timestamp |\n                        BgpParser.bgp.state_change[.human].peer_protocol |\n                        BgpParser.bgp.state_change[.human].peer_as |\n                        BgpParser.bgp.state_change[.human].peer_ip |\n                        BgpParser.bgp.state_change[.human].old_state |\n                        BgpParser.bgp.state_change[.human].new_state\n                       Available:\n                        BgpParser.bgp.state_change[.human].ALL\n                        BgpParser.bgp.state_change[.human].NONE\n                        BgpParser.bgp.state_change[.human].DEFAULT]\n  bgp_route         - Select [optionally human-readable] attribute to be included in BgpRouteRecord entries.\n                      Supports bitwise logical operators (OR/AND/NOT) to specify multiple attributes.\n                      [Default:\n                        BgpParser.bgp.route[.human].type |\n                        BgpParser.bgp.route[.human].source |\n                        BgpParser.bgp.route[.human].sequence |\n                        BgpParser.bgp.route[.human].timestamp |\n                        BgpParser.bgp.route[.human].peer_protocol |\n                        BgpParser.bgp.route[.human].peer_bgp_id |\n                        BgpParser.bgp.route[.human].peer_as |\n                        BgpParser.bgp.route[.human].peer_ip |\n                        BgpParser.bgp.route[.human].nexthop_protocol |\n                        BgpParser.bgp.route[.human].nexthop_ip |\n                        BgpParser.bgp.route[.human].prefix_protocol |\n                        BgpParser.bgp.route[.human].prefix |\n                        BgpParser.bgp.route[.human].path_id |\n                        BgpParser.bgp.route[.human].aspath |\n                        BgpParser.bgp.route[.human].origin |\n                        BgpParser.bgp.route[.human].communities |\n                        BgpParser.bgp.route[.human].large_communities\n                       Available:\n                        BgpParser.bgp.route[.human].extended_communities\n                        BgpParser.bgp.route[.human].multi_exit_disc\n                        BgpParser.bgp.route[.human].atomic_aggregate\n                        BgpParser.bgp.route[.human].aggregator_protocol\n                        BgpParser.bgp.route[.human].aggregator_as\n                        BgpParser.bgp.route[.human].aggregator_ip\n                        BgpParser.bgp.route[.human].only_to_customer\n                        BgpParser.bgp.route[.human].originator_id\n                        BgpParser.bgp.route[.human].cluster_list\n                        BgpParser.bgp.route[.human].local_pref\n                        BgpParser.bgp.route[.human].attr_set\n                        BgpParser.bgp.route[.human].as_pathlimit\n                        BgpParser.bgp.route[.human].aigp\n                        BgpParser.bgp.route[.human].attrs_unknown\n                        BgpParser.bgp.route[.human].ALL\n                        BgpParser.bgp.route[.human].NONE\n                        BgpParser.bgp.route[.human].DEFAULT]\n  bgp_keep_alive    - Select [optionally human-readable] attribute to be included in BgpKeepAliveRecord entries.\n                      Supports bitwise logical operators (OR/AND/NOT) to specify multiple attributes.\n                      [Default:\n                        BgpParser.bgp.keep_alive[.human].type |\n                        BgpParser.bgp.keep_alive[.human].timestamp |\n                        BgpParser.bgp.keep_alive[.human].peer_protocol |\n                        BgpParser.bgp.keep_alive[.human].peer_as |\n                        BgpParser.bgp.keep_alive[.human].peer_ip\n                       Available:\n                        BgpParser.bgp.keep_alive[.human].ALL\n                        BgpParser.bgp.keep_alive[.human].NONE\n                        BgpParser.bgp.keep_alive[.human].DEFAULT]\n  bgp_route_refresh - Select [optionally human-readable] attribute to be included in BgpRouteRefreshRecord entries.\n                      Supports bitwise logical operators (OR/AND/NOT) to specify multiple attributes.\n                      [Default:\n                        BgpParser.bgp.route_refresh[.human].type |\n                        BgpParser.bgp.route_refresh[.human].timestamp |\n                        BgpParser.bgp.route_refresh[.human].peer_protocol |\n                        BgpParser.bgp.route_refresh[.human].peer_as |\n                        BgpParser.bgp.route_refresh[.human].peer_ip |\n                        BgpParser.bgp.route_refresh[.human].refresh_protocol\n                       Available:\n                        BgpParser.bgp.route_refresh[.human].ALL\n                        BgpParser.bgp.route_refresh[.human].NONE\n                        BgpParser.bgp.route_refresh[.human].DEFAULT]\n  bgp_notification  - Select [optionally human-readable] attribute to be included in BgpNotificationRecord entries.\n                      Supports bitwise logical operators (OR/AND/NOT) to specify multiple attributes.\n                      [Default:\n                        BgpParser.bgp.notification[.human].type |\n                        BgpParser.bgp.notification[.human].timestamp |\n                        BgpParser.bgp.notification[.human].peer_protocol |\n                        BgpParser.bgp.notification[.human].peer_as |\n                        BgpParser.bgp.notification[.human].peer_ip |\n                        BgpParser.bgp.notification[.human].error_code |\n                        BgpParser.bgp.notification[.human].error_subcode |\n                        BgpParser.bgp.notification[.human].data\n                       Available:\n                        BgpParser.bgp.notification[.human].ALL\n                        BgpParser.bgp.notification[.human].NONE\n                        BgpParser.bgp.notification[.human].DEFAULT]\n  bgp_open          - Select [optionally human-readable] attribute to be included in BgpOpenRecord entries.\n                      Supports bitwise logical operators (OR/AND/NOT) to specify multiple attributes.\n                      [Default:\n                        BgpParser.bgp.open[.human].type |\n                        BgpParser.bgp.open[.human].timestamp |\n                        BgpParser.bgp.open[.human].peer_protocol |\n                        BgpParser.bgp.open[.human].peer_as |\n                        BgpParser.bgp.open[.human].peer_ip |\n                        BgpParser.bgp.open[.human].version |\n                        BgpParser.bgp.open[.human].my_as |\n                        BgpParser.bgp.open[.human].hold_time |\n                        BgpParser.bgp.open[.human].bgp_id |\n                        BgpParser.bgp.open[.human].capabilities\n                       Available:\n                        BgpParser.bgp.open[.human].params_unknown\n                        BgpParser.bgp.open[.human].ALL\n                        BgpParser.bgp.open[.human].NONE\n                        BgpParser.bgp.open[.human].DEFAULT]\n  bgp_stats         - Select [optionally human-readable] attribute to be included in BgpStatsRecord entries.\n                      Supports bitwise logical operators (OR/AND/NOT) to specify multiple attributes.\n                      [Default:\n                        BgpParser.bgp.stats[.human].type |\n                        BgpParser.bgp.stats[.human].parser_lifetime |\n                        BgpParser.bgp.stats[.human].parser_runtime |\n                        BgpParser.bgp.stats[.human].parser_errors |\n                        BgpParser.bgp.stats[.human].lgl_runtime |\n                        BgpParser.bgp.stats[.human].lgl_entries |\n                        BgpParser.bgp.stats[.human].lgl_errors |\n                        BgpParser.bgp.stats[.human].mrt_runtime |\n                        BgpParser.bgp.stats[.human].mrt_entries |\n                        BgpParser.bgp.stats[.human].mrt_errors |\n                        BgpParser.bgp.stats[.human].mrt_fixes |\n                        BgpParser.bgp.stats[.human].mrt_bgp_entry_types |\n                        BgpParser.bgp.stats[.human].mrt_bgp_message_types |\n                        BgpParser.bgp.stats[.human].mrt_bgp_attribute_types |\n                        BgpParser.bgp.stats[.human].mrt_bgp_capability_types |\n                        BgpParser.bgp.stats[.human].bgp_routes_rib_ipv4 |\n                        BgpParser.bgp.stats[.human].bgp_routes_rib_ipv6 |\n                        BgpParser.bgp.stats[.human].bgp_routes_announce_ipv4 |\n                        BgpParser.bgp.stats[.human].bgp_routes_announce_ipv6 |\n                        BgpParser.bgp.stats[.human].bgp_routes_withdraw_ipv4 |\n                        BgpParser.bgp.stats[.human].bgp_routes_withdraw_ipv6\n                       Available:\n                        BgpParser.bgp.stats[.human].ALL\n                        BgpParser.bgp.stats[.human].NONE\n                        BgpParser.bgp.stats[.human].DEFAULT]\n  bgp_error         - Select [optionally human-readable] attribute to be included in BgpErrorRecord entries.\n                      Supports bitwise logical operators (OR/AND/NOT) to specify multiple attributes.\n                      [Default:\n                        BgpParser.bgp.error[.human].type |\n                        BgpParser.bgp.error[.human].source |\n                        BgpParser.bgp.error[.human].scope |\n                        BgpParser.bgp.error[.human].record |\n                        BgpParser.bgp.error[.human].reason |\n                        BgpParser.bgp.error[.human].message |\n                        BgpParser.bgp.error[.human].data |\n                        BgpParser.bgp.error[.human].trace\n                       Available:\n                        BgpParser.bgp.error[.human].ALL\n                        BgpParser.bgp.error[.human].NONE\n                        BgpParser.bgp.error[.human].DEFAULT]\n\nReturns:\n  parse(<filename>) - Parse function that accepts a filename as single positional argument and generates\n                      all specified BGP records on invocation. Input files can be provided in .bz2 or .gz\n                      format. The parse function may be invoked multiple times within a single context.\n\nRaises:\n  FtlError          - Generic parser or runtime error.\n  FtlFileError      - Failure during access of input file.\n  FtlFormatError    - Unexpected format of input file.\n  FtlDataError      - Invalid data entry in input file.\n```\n\n## Author\n\nJohann SCHLAMP <[schlamp@leitwert.net](mailto:schlamp@leitwert.net)> \n\n## License\n\nCopyright (C) 2014-2024 Leitwert GmbH\n\nThis software is distributed under the terms of the MIT license.    \nIt can be found in the LICENSE file or at [https://opensource.org/licenses/MIT](https://opensource.org/licenses/MIT).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python parser for BGP data in MRT or looking glass format",
    "version": "1.0.3",
    "project_urls": {
        "Homepage": "https://github.com/leitwert-net/ftlbgp",
        "Issues": "https://github.com/leitwert-net/ftlbgp/issues"
    },
    "split_keywords": [
        "bgp",
        " mrt",
        " parser"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d2a55615a00cc96a09dfc913231820dbcf65c8ade1226348b3303c06eca391f0",
                "md5": "1f4d5b47a885a1f8bb5a642b8482edf3",
                "sha256": "d24f46afe42fa4ab03221db8fcea82471a2ad7a49fcb97e988d331a15680c59a"
            },
            "downloads": -1,
            "filename": "ftlbgp-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1f4d5b47a885a1f8bb5a642b8482edf3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 81177,
            "upload_time": "2024-10-30T22:36:43",
            "upload_time_iso_8601": "2024-10-30T22:36:43.208805Z",
            "url": "https://files.pythonhosted.org/packages/d2/a5/5615a00cc96a09dfc913231820dbcf65c8ade1226348b3303c06eca391f0/ftlbgp-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "60af68b7b49f5f8cfe72bde952d63c61aedeb030adc4c5a8499f6fd1a7bc0bac",
                "md5": "22f29cd940369e94ddb56c82cea91773",
                "sha256": "ae17c68c0596315c08bbb5b1eaeee92bba16f27a1c186660595b285e3f6a3053"
            },
            "downloads": -1,
            "filename": "ftlbgp-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "22f29cd940369e94ddb56c82cea91773",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 61046,
            "upload_time": "2024-10-30T22:36:46",
            "upload_time_iso_8601": "2024-10-30T22:36:46.255319Z",
            "url": "https://files.pythonhosted.org/packages/60/af/68b7b49f5f8cfe72bde952d63c61aedeb030adc4c5a8499f6fd1a7bc0bac/ftlbgp-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-30 22:36:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "leitwert-net",
    "github_project": "ftlbgp",
    "github_not_found": true,
    "lcname": "ftlbgp"
}
        
Elapsed time: 0.37236s