Installation
pip install driveconnect
Or:
pip install git+https:\\github.com\gwangjinkim\driveconnect.git
Or:
pipenv install git+https:\\github.com\gwangjinkim\driveconnect.git#egg=driveconnect
Or:
poetry add driveconnect # version number: driveconnect==0.1.8
Or (from github repo):
poetry add git+ssh://git@github.com/gwangjinkim/driveconnect.git#main
Usage
import driveconnect as dcn
import pycryptaes as pca
import logging as log
print(dcn.__version__)
# set better pretty print for log message on stdout:
dcn.set_pprint_width(width=81)
# instanciate encryptor
ca = pca.AES()
# for saving some typing on REPL:
home = "C:/Users/myusername"
p = lambda x: f"{home}/{x}"
args = (p(".key"), p(".user"), p(".pass"))
# set logger
log.basicConfig(filename=f"{home}/mylog.log", filemode='a', level=log.DEBUG)
# if first time using credentials, you have to enter username and password after typing:
ca.generate_key_user_pass(*args)
# otherwise comment out the previous line and collect/read the previously saved credentials:
co = ca.read_key_user_pass(*args) # `co` = `Credential Object`
# now you can test, wether a drive e.g. 'G:' is connected:
dcn.is_drive_connected(drive_letter='G') # it works also with "G:"
## False
# connect to the server
# leading '\\' can be left out in server address and the 'M:' as well as 'M' both work
dcn.connect_drive('G:', '\\serveraddress\folder', co=co, log=log, level="info")
# or for connections where no credentials are needed:
dcn.connect_drive('G:', '\\serveraddress\folder', log=log, level="info", _print=True)
# `log=`, `level=` and `_print=` are optional.
# disconnect from the server
dcn.disconnect_drive('G:', log=log, level="info", _print=True)
# or without logger:
dcn.disconnect_drive('G:', _print=True)
Metadata
Release files for driveconnect 0.1.15
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 |
|---|---|---|---|---|
| driveconnect-0.1.15.tar.gz | 4.0 kB | Without provenance | Details for driveconnect-0.1.15.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| driveconnect-0.1.15-py3-none-any.whl | Python 3 | none | any | Details for driveconnect-0.1.15-py3-none-any.whl |
Total release size: 7.9 kB
Release files / driveconnect-0.1.15.tar.gz
| Download URL | driveconnect-0.1.15.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab7b0d5c521e83591684ec167e865ec43289c3caa87c2bc2e5858afbfabcb1d1
|
|
BLAKE2b-256 checksum How to use checksums |
e81b7d58e065b020c16a63d4e408fb9f18ddfb7e4f290bf87b79ddf30f1716ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.7 Windows/10
|
Release files / driveconnect-0.1.15-py3-none-any.whl
| Download URL | driveconnect-0.1.15-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d6ba7a2fe72fe9b6e876bc09123d3125c09f2d446290d0d0b946022811b2c7c0
|
|
BLAKE2b-256 checksum How to use checksums |
9c1bfae28c90059b06eb43f63f98c170a17a06e9776073b74ce564cb382a6194
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.7 Windows/10
|
Security for driveconnect 0.1.15
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.