topftp
a package on top of ftplib to use FTP easily
installation
pip install topftp
usage
from topftp.ftp import FTP
host = "127.0.0.1"
user ="username"
password = "password"
port = 21
timeout = 5
ftp = FTP(host, user, password, port=port, timeout=timeout)
# set verbose to True to print exceptions
# set silent to True to not raise exceptions
# ftp.silent = True
# ftp.verbose = True
ftp.connect()
# list files in current directory
files, folders = ftp.listdir()
# download file
ftp.download("/file.txt", "local_file.txt")
# download file content to list
lines = ftp.download_to_list("/file.txt")
# upload file
ftp.upload("local_file.txt", "/remote_file.txt")
# upload from string
ftp.upload_from_string("Hello, topftp!", "/remote_file.txt")
# delete file
ftp.delete("/remote_file.txt")
# for missing methods on ftplib.FTP, you can use them directly
# ftp.some_method(*args, **kwargs)
# is same to
# ftp.ftp.some_method(*args, **kwargs)
# close connection
ftp.close()
Metadata
Release files for topftp 2024.9.13
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 | |
|---|---|---|---|---|
| topftp-2024.9.13.tar.gz | 4.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| topftp-2024.9.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.0 kB
Release files / topftp-2024.9.13.tar.gz
| Download URL | topftp-2024.9.13.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9375d811a7ba5a0cafbefce91962a92499e913afa7552f1c0566fb1a50a89915
|
|
BLAKE2b-256 checksum How to use checksums |
e84b638e84f9968a064f044699626d7eca87ce89d026c85a4f04f091610cb4ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / topftp-2024.9.13-py3-none-any.whl
| Download URL | topftp-2024.9.13-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c709f751c2a0692cd13c5d28dfea91be05a679bef4841aa965951cecf702d23
|
|
BLAKE2b-256 checksum How to use checksums |
1892f2a096df6ecc7944e2724d542219cd64df7b2037c034d1d9976292c9a0fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for topftp 2024.9.13
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.