Skip to main content

ruia-cache

A Ruia plugin for caching URL

Installation

pip install -U ruia-cache

# New features
pip install git+https://github.com/python-ruia/ruia-cache

Usage

ruia-cache will automatically cache the captured URL to prevent the second request to the target web page:

import os

from ruia_cache import RuiaCacheSpider

# Set RUIA_CACHE path
os.environ.setdefault(
    "RUIA_CACHE", os.path.dirname(__file__),
)


class Demo(RuiaCacheSpider):
    name = "demo_spider"
    start_urls = ["http://httpbin.org/get"]

    async def parse(self, response):
        html = await response.text()
        print(html)


if __name__ == "__main__":
    Demo.start()
    # Using cache data
    Demo.start()

Enjoy it :)

Metadata

Release files for ruia-cache 0.0.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 ruia-cache 0.0.2
File Size Uploaded Provenance Actions
ruia_cache-0.0.2.tar.gz 4.8 kB Without provenance Details for ruia_cache-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ruia-cache 0.0.2
File Interpreter ABI Platform Actions
ruia_cache-0.0.2-py3-none-any.whl Python 3 none any Details for ruia_cache-0.0.2-py3-none-any.whl

Total release size: 16.4 kB

Release files / ruia_cache-0.0.2.tar.gz

Download URL ruia_cache-0.0.2.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b0d940eb125c85e468761da000ae2f43b67c6dd9c3b0cefa630679d630763ab0
BLAKE2b-256 checksum
How to use checksums
8729101cb95c88d914ee1e64ca05c564a1470ccb779fd74e4d748d0baa454194
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

Release files / ruia_cache-0.0.2-py3-none-any.whl

Download URL ruia_cache-0.0.2-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f567db1b5f32844a3ae41b655a743009ae7b47edcc428b3a149d37d5c6696d4d
BLAKE2b-256 checksum
How to use checksums
13337907855b553614c1442e695f940d0f5a22e382de03bb06521be35bbf62be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

Security for ruia-cache 0.0.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.0.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