Status
This is not yet finished, but can already be used.
History
v 0.2.7
Updated readme
v 0.2.6
Introduced the jobsbuffersizemax argument to limit the amount of upload-processed buffered in working memory. Now it is possible to work on data of infinite size.
v 0.2.5
only spawn one concurrent process for performing uploads
v 0.2.4
working version, still spans unlimited amount of processes
Usage
Create a new mpcouchPusher object
myCouchPusher = mpcouch.mpcouchPusher( "http://localhost:5984/myDatabase", 30000 )
If the data is created faster than the upload happens, it might be necessary to let the generation of new documents pause befor allowing another batch-upload process to be buffered. The amount of bufferd upload-processes is specified by the optional jobsbuffersizemax argument which defaults to 10. This means that when there are 10 batch-upload processes already waiting in line to be executed, the module holds the main python thread until one process has finished. By adjusing this value it is possible to find an equilibrium between upload-buffer (working memory) and document generation speed.
Use this object every time you have one single document ready to be stored in the database:
myCouchPusher.pushData(myNewDocument)
The module will collect all documents until the threshold is reached (in our example this would be the 30000 specified above) and upload them as a batch to the CouchDB also specified at creation time of the object (myCouchDbDatabase).
Since every bulk-upload is performed by a single process, the original program continues while the upload happens in the background.
To wait for all running uploads to finish and to make sure the very last batch of documents gets pushed to the server, run
myCouchPusher.finish()
after your final document was sent to pushData. The module now waits for all the uploads to finish and uploads the final bulk of collected documents.
Metadata
Release files for mpcouch 0.2.7
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 |
|---|---|---|---|---|
| mpcouch-0.2.7.tar.gz | 4.3 kB | Without provenance | Details for mpcouch-0.2.7.tar.gz |
Release files / mpcouch-0.2.7.tar.gz
| Download URL | mpcouch-0.2.7.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
509ea58735383a0aa13e51d245c93cd20a54ccf8f08661195637b0278a5f2abf
|
|
BLAKE2b-256 checksum How to use checksums |
062a885a9d5c79fa05b3618d3fdd4b38b3cab8336549ad1e5b1c669d2031d055
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for mpcouch 0.2.7
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.