← All notes

Python ftplib: an FTP protocol client

Answer: This module defines the class FTP and a few related items. That class implements the client side of the FTP protocol. You can write programs that perform automated FTP jobs, such as mirroring other FTP servers. The default encoding is UTF 8.

A client for FTP jobs

The module defines the class FTP and a few related items.

That class implements the client side of the FTP protocol.

You can write programs that perform automated FTP jobs, such as mirroring other FTP servers.

The module urllib.request also uses it to handle URLs that use FTP.

Defaults in the source docs

The default encoding is UTF 8, following RFC 2640.

For more information on FTP, see internet RFC 959.

A sample session connects to a host, logs in, and lists directory contents.

This module does not work or is not available on WebAssembly.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Python Software Foundation, ftplib — FTP protocol client; CPython, ftplib documentation (source). PSF-2.0 (https://docs.python.org/3/license.html). Copyright Python Software Foundation. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Python Software Foundation, ftplib — FTP protocol client; CPython, ftplib documentation (source). PSF-2.0 (https://docs.python.org/3/license.html). Copyright Python Software Foundation.

Cite this

Permanent ID: iil:note:hv4bv3z4

iinventedlight. 2026. "Python ftplib: an FTP protocol client." iinventedlight Library, iil:note:hv4bv3z4, version of 2026-11-23. https://iinventedlight.com/library/notes/python-ftplib/. License: CC-BY-4.0.

@misc{iil_note_hv4bv3z4,
  author = {{iinventedlight}},
  title = {{Python ftplib: an FTP protocol client}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-23},
  url = {https://iinventedlight.com/library/notes/python-ftplib/},
  note = {Permanent ID iil:note:hv4bv3z4. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/python-ftplib.md.