Scrapy S3 Log Storage
DEPRECATED
This package is deprecated. Please use scrapy-logexport instead.
Description
A Scrapy extension to upload log files to S3.
If you're already exporting your feeds to S3 this extension uses many of the same settings. After adding this extension to your EXTENSIONS setting, just set the LOG_FILE, S3_LOG_BUCKET and an optional S3_LOG_ACLsettings and you're good to go.
Installation
You can install scrapy-s3logstorage using pip:
pip install scrapy-s3logstorage
Configuration
This extension still requires that a local log file is written. Once scrapy's engine has stopped, the extension will upload the log file to S3 and optionally delete the local file.
Enable the extension by adding it to your settings.py:
from environs import Env
env = Env()
env.read_env()
EXTENSIONS = {
'scrapy_s3logstorage.extension.S3LogStorage': 0,
}
LOG_FILE = 'scrapy.log' # Must be a local file
S3_LOG_BUCKET = 'my-bucket' # Bucket name to store logs
S3_LOG_DELETE_LOCAL = True # Delete local log file after upload, defaults to False
# If AWS CLI is configured, and you're using the same credentials the following settings are optional
AWS_ACCESS_KEY_ID = env("AWS_ACCESS_KEY_ID")
AWS_SECRET_ACCESS_KEY = env("AWS_SECRET_ACCESS_KEY")
AWS_SESSION_TOKEN = env("AWS_SESSION_TOKEN") # if required
AWS_ENDPOINT_URL = None # or your endpoint URL
# S3_LOG_ACL takes priority over FEED_STORAGE_S3_ACL.
# If S3_LOG_ACL is not set, FEED_STORAGE_S3_ACL will be used.
# Setting one or both of these settings is optional.
S3_LOG_ACL = '' # or other S3 ACL
FEED_STORAGE_S3_ACL = '' # or other S3 ACL
Metadata
Release files for scrapy-s3logstorage 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| scrapy_s3logstorage-0.1.1.tar.gz | 3.4 kB | Without provenance | Details for scrapy_s3logstorage-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scrapy_s3logstorage-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for scrapy_s3logstorage-0.1.1-py3-none-any.whl |
Total release size: 7.6 kB
Release files / scrapy_s3logstorage-0.1.1.tar.gz
| Download URL | scrapy_s3logstorage-0.1.1.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22d913b0375dcaf4d8fabea5e7be5a5a729ad560d06e5850e0ed82e17312bb13
|
|
BLAKE2b-256 checksum How to use checksums |
2136af70d56e7d5e79e6904b5def4d09af7e4393a93f2db9a25e5e0476843d2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.6 Linux/5.19.0-43-generic
|
Release files / scrapy_s3logstorage-0.1.1-py3-none-any.whl
| Download URL | scrapy_s3logstorage-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3fe611bb12117e90b17e2000978c57a1bd919ff4873e9277f77283ed5122b1a0
|
|
BLAKE2b-256 checksum How to use checksums |
ee3218c393d73997b01b1e0151542f907aade1a413114cf82d30a2feb1b1b765
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.6 Linux/5.19.0-43-generic
|
Security for scrapy-s3logstorage 0.1.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.