Download SERP snapshots from the MongoDB library
Project description
SERP Real Estate Snapshots Package
A pure Python package to allow developers access to a SERP Real Estate snapshots library hosted on a NoSQL architecture.
Installation
Install using pip:
pip install sre-snapshots
Reading Snapshots
You can read snapshots by:
from sre_snapshots.download_snapshots import SnapshotLibrary
library = SnapshotLibrary(
host='127.0.0.1',
database_name='my_db',
collection_name='my_col'
)
# First 100 snapshots
snapshots = library.find_documents(
filter_criteria={},
datetime_from='2020-07-01 00:00:00',
datetime_to='2020-07-03 23:59:59',
limit=10,
include_id=True
)
# First 100 snapshots for a specific company
snapshots_for_company = library.find_documents(
filter_criteria={
'matching_keyword.name': 'my_company'
},
datetime_from='2020-07-01 00:00:00',
datetime_to='2020-07-03 23:59:59',
limit=10,
include_id=True
)
# Specific snapshot using ObjectId
specific_snapshot = library.find_documents(
datetime_from='2020-06-01 00:00:00',
object_id='5ee8b4814c74c3312a81b7b8'
)
About the Database
The database is indexed on the following fields:
matching_keyword.name(Name of the company)search_metadata.created_at(Date & time the search was performed)
Therefore, querying the library filtering on these fields will be very fast but filtering on any other field may be quite slow.
Inserting New Snapshots
TODO: Instructions on inserting new snapshots to the database.
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
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 sre_snapshots-0.0.8.tar.gz.
File metadata
- Download URL: sre_snapshots-0.0.8.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.5.0.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1556bfacac306be49abf1cf667fb13e8f9748a389380d1c3c64244a8a1a054d6
|
|
| MD5 |
5db7e561c0e0df92f36df4aa94722168
|
|
| BLAKE2b-256 |
33260a25107543d59dc7bda21212927e5bc3466550ef863495143714855b4a4f
|
File details
Details for the file sre_snapshots-0.0.8-py3-none-any.whl.
File metadata
- Download URL: sre_snapshots-0.0.8-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.5.0.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35e97446baeda59f8540a1ac0d4ce9017aa1815dd67701fb3a0986db6db2bfd7
|
|
| MD5 |
15a99806bf7bef9df79938552c65690b
|
|
| BLAKE2b-256 |
d23c57655ad7161092a370c1fd5f78e9504084bfe45dca4a308bdc91f27cd8d8
|