Skip to main content

Registration Data Access Protocol tools

Project description

rdap

PyPI PyPI tests Codecov

Registration Data Access Protocol tools

Installation

pip install rdap

Usage

usage: rdap [-h] [--debug] [--home HOME] [--verbose] [--quiet] [--version] [--output-format OUTPUT_FORMAT] [--show-requests] [--parse] [--rir] [--write-bootstrap-data] query [query ...]

rdap

positional arguments:
  query

options:
  -h, --help            show this help message and exit
  --debug               enable extra debug output
  --home HOME           specify the home directory, by default will check in order: $RDAP_HOME, ./.rdap, /home/grizz/.rdap, /home/grizz/.config/rdap
  --verbose             enable more verbose output
  --quiet               no output at all
  --version             show program's version number and exit
  --output-format OUTPUT_FORMAT
                        output format (yaml, json, text)
  --show-requests       show all requests
  --parse               parse data into object before display
  --rir                 display rir
  --write-bootstrap-data
                        write bootstrap data for type (as query)

Testing

Running Tests

By default, all tests run including network tests. Network tests automatically skip on timeout or connection errors to avoid CI failures due to transient network issues.

# Run all tests (default - network tests skip on timeout)
pytest

# Run tests excluding network tests entirely
pytest -m "not network"

# Run only network tests
pytest -m "network"

# Run network tests in strict mode (fail on timeout instead of skip)
pytest -m "network" --network-strict

Network tests are marked with @pytest.mark.network. When these tests encounter timeouts or connection errors, they automatically skip instead of failing (unless run with --network-strict).

Config file

The client uses the --home option to point to a directory, by default will check in order: $RDAP_HOME, ./.rdap, ~/.rdap, ~/.config/rdap

The directory should have a config.yaml file in it, defaults shown below.

rdap:
  # URL to bootstrap the initial request off
  bootstrap_url: https://rdap.db.ripe.net/
  # boolean to use data from bootstrap_data_url instead of a bootstrap server
  self_bootstrap: False
  # url to load bootstrap data from
  bootstrap_data_url: "https://data.iana.org/rdap/"
  # length of time in hours to keep bootstrap data
  bootstrap_cache_ttl: 25
  # how to format the output
  output_format: yaml
  # API key for use at rdap.lacnic.net
  lacnic_apikey: None
  # role types to recursively query when processing
  recurse_roles: ["administrative", "technical"]
  # HTTP request timeout in seconds, used for both connect and read
  timeout: 0.5

License

Copyright 2016-2024 20C, LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this softare except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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

rdap-1.7.0.tar.gz (141.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rdap-1.7.0-py3-none-any.whl (31.7 kB view details)

Uploaded Python 3

File details

Details for the file rdap-1.7.0.tar.gz.

File metadata

  • Download URL: rdap-1.7.0.tar.gz
  • Upload date:
  • Size: 141.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rdap-1.7.0.tar.gz
Algorithm Hash digest
SHA256 c06fb48891c267bc5f136eec525cc715c761e73332586231b5935b86a0d0a544
MD5 92a42bc76d12fca7300b331c4f8db6a7
BLAKE2b-256 f919b93b153b88fc764e36abb59aab6ac482e40d20d67ea3eec0a733b436b828

See more details on using hashes here.

Provenance

The following attestation bundles were made for rdap-1.7.0.tar.gz:

Publisher: release.yml on 20c/rdap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rdap-1.7.0-py3-none-any.whl.

File metadata

  • Download URL: rdap-1.7.0-py3-none-any.whl
  • Upload date:
  • Size: 31.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rdap-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4dfea71c65c71592113b3ada130f5fba25a2b5a6a5eb8022785fcf7ee2fb2cfa
MD5 2e3febe299ae917211d447d949e0b25a
BLAKE2b-256 65d44b52babcd3170be4891f482cd924534addf7819f88ec5d65094ce4adff24

See more details on using hashes here.

Provenance

The following attestation bundles were made for rdap-1.7.0-py3-none-any.whl:

Publisher: release.yml on 20c/rdap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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