Skip to main content

syncs3

To give a document sync experience(and eficciency) like 'repo sync', or 'awscli s3 sync', and so forth. Permit records to be transferred on downloaded ONLY on the off chance that there is a distinction in the document's local cs remote duplicate. Give this as a convinience bundle for involving distant resources in journals.

Acknowledgements

Tech Stack

Language: Python 3.8.2

Developing syncs3

To install syncs3, along with the tools ypu need to develop and run tests, run the following in ypur virtualenv:

$ pip install -e .[dev]

Usage/Examples

Example 1: Upload object on aws

'''Create object of the LocalObjectCache to initialize the bucket name and prefix.'''
bucket_name = bucket_name
prefix = prefix_name
obj = syncs3(bucket_name, prefix)

'''uploading a obj.'''
__filename__ = file_name
key = os.path.abspath(__filename__)
obj.upload_obj(key)

Example 2: Download object from aws

'''Downloading a key from obj.'''  
__filename__ = file_name
key = os.path.join(obj.prefix, __filename__)

''' download_obj takes a parameter tag which is the value of tag which is returned when the object is uploaded on the aws.'''
obj.download_obj(key, tag_value)

Example 3: sync data of remote s3 bucket and local

"""Syncs the data of remote s3 bucket and local directory."""
obj.sync()

Example 4: Delete all files form local cache

"""Delete all files from the local cache."""
obj.close()

Example 5: Pickle and un-pickle the self object between multiprocessing pools

"""It takes an argument bucket_name. If bucket name is given then it will change the bucket name else returns the current bucket name and set it at none."""
obj.set_bucket()

Example 6: Calculate s3 e-tag of a file

filename__ = file_name
key = os.path.abspath(filename__)
'''open file on `rb` mode '''
file = open(key, 'rb') 
'''returns a tag of the file '''
obj.calculate_s3_etag(file)

Example 7: Get local file storage path of a given file key

filename__ = file_name
key = os.path.abspath(filename__)
'''Returns a local file storage path for a given file key '''
obj.get_path(key)

Metadata

Release files for syncs3 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for syncs3 0.1.1
File Size Uploaded Provenance Actions
syncs3-0.1.1.tar.gz 4.1 kB Without provenance Details for syncs3-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for syncs3 0.1.1
File Interpreter ABI Platform Actions
syncs3-0.1.1-py3-none-any.whl Python 3 none any Details for syncs3-0.1.1-py3-none-any.whl

Total release size: 8.1 kB

Release files / syncs3-0.1.1.tar.gz

Download URL syncs3-0.1.1.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
132582399fdffb85096cdf0b8a1255699ba3a51fbf71bc1305e1f0a8262cd32b
BLAKE2b-256 checksum
How to use checksums
9895d8b225d14299fd32c5933bd70795b0d97644674f3695542fcc1e1475e65a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.12

Release files / syncs3-0.1.1-py3-none-any.whl

Download URL syncs3-0.1.1-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7499a549addecb2a2badef5e6023343eb18ca9069b8069002ba50541d7f95e01
BLAKE2b-256 checksum
How to use checksums
c6d0c5ef300e355391ea01e5a61dd26315cbec6c33cc8708ce0093dd5dc6a72b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.12

Security for syncs3 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.

Release history Release notifications | RSS feed

This release

0.1.1 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