Skip to main content

Polars Domain Lookup Plugin

This plugin extends the functionality of Polars by providing a method to check whether domains are included in a predefined list of the top 1,000,000 domains. The result is returned as a boolean value (True/False).

Features

  • Domain Lookup: Checks if the provided domains are included in a list of the top 1,000,000 domains.
  • Integration with Polars: Works seamlessly with Polars DataFrames, offering fast processing.

Requirements

  • Python 3.8+
  • Polars library

Install Polars with:

uv add polars
  • Top 1 Million Domains List: The domain list must be provided as a file (e.g., cloudflare-radar_top-1000000-domains.csv) in CSV format. This file can be downloaded from sources like Cloudflare Radar.

Installation

Add the plugin to your project. Install it directly from the repository or manually include the Python file.

uv add polars-domain-lookup

Usage

Example Code

import polars as pl
from polars_domain_lookup import is_common_domain

# Example DataFrame with domains
df = pl.DataFrame({
    "domains": ["example.com", "google.com", "nonexistentdomain.xyz"]
})

# Perform the lookup
df = df.with_columns(
    is_common_domain(df["domains"], top_domains_file="cloudflare-radar_top-1000000-domains.csv").alias("is_common_domain")
)

print(df)

Output

If cloudflare-radar_top-1000000-domains.csv contains google.com, the output will look like this:

shape: (3, 2)
┌───────────────────────┬───────────────┐
│ domains               │ is_top_domain │
├───────────────────────┼───────────────┤
│ example.com           │ false         │
│ google.com            │ true          │
│ nonexistentdomain.xyz │ false         │
└───────────────────────┴───────────────┘

Metadata

Release files for polars-domain-lookup 0.2.1

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

Source distribution (sdist)

Source distribution for polars-domain-lookup 0.2.1
File Size Uploaded Provenance
polars_domain_lookup-0.2.1.tar.gz 13.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for polars-domain-lookup 0.2.1
File Interpreter ABI Platform
polars_domain_lookup-0.2.1-cp38-abi3-manylinux_2_34_x86_64.whl CPython 3.8 abi3 Linux glibc 2.34+ x86-64 Details

Total release size: 3.4 MB

Release files / polars_domain_lookup-0.2.1.tar.gz

Download URL polars_domain_lookup-0.2.1.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d7936b96baec45761dac0e376a5d61d3fa855af0beacc35ff7daf9c030c42579
BLAKE2b-256 checksum
How to use checksums
54342b4514aaf8bd2a0ad5e05f0dbc4fdfd21eb2672038542c85285d1cdb4312
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.8

Release files / polars_domain_lookup-0.2.1-cp38-abi3-manylinux_2_34_x86_64.whl

Download URL polars_domain_lookup-0.2.1-cp38-abi3-manylinux_2_34_x86_64.whl
Size 3.4 MB
Tags CPython 3.8 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
4cdd0f16458ca663c45b4022cecedbc91fe4f5c0b07f6da75371edd01c48f1e2
BLAKE2b-256 checksum
How to use checksums
07e75395654c0a4d0a7a99193fdd891582f16f7f0a6690cda321132a129fad3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.8

Security for polars-domain-lookup 0.2.1

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.

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