persist item to the database table
Project description
scrapy database pipeline
Introduction
Use pipeline to persist item to the database, just provide the tablename
INSTALL
.. code:: shell
pip install scrapy_db_pipeline
Usage
configure on setting.py
.. code:: python
DB_HOST = 'localhost'
DB_USER = 'root'
DB_PASSWORD = 'password'
DB_NAME = 'db_name
ITEM_PIPELINES = {
#...
'scrapy_db_pipeline.pipelines.DBStorePipeline': 300,
#...
}
write your item
.. code:: python
class CalendarItem(scrapy.Item):
__table_name__ = 'your_table_name'
some_item = scrapy.Field()
tips: You must create the table before running Scrapy. Because I can't know what the type of your field on the database table.
TODO:
database support (if I have time):
- mysql
- ....
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scrapy_db_pipeline-1.1-py3.7.egg.
File metadata
- Download URL: scrapy_db_pipeline-1.1-py3.7.egg
- Upload date:
- Size: 4.7 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17a2e2540260c7eb32bd0ef301fda15103b89793c3a44ff46520325661bec2d8
|
|
| MD5 |
2861aed9c1ddec071a80cb5675232bef
|
|
| BLAKE2b-256 |
5b6de9fd366d9d9172edb3f8c34159c64640577f9ca61ff3ac4fb07dbcc085c5
|