Part of bzrlib
The abstraction is to allow access from the local filesystem, as well as remote (such as http or sftp).
Transports are constructed from a string, being a URL or (as a degenerate case) a local filesystem path. This is typically the top directory of a bzrdir, repository, or similar object we are interested in working with. The Transport returned has methods to read, write and manipulate files within it.
Module | brokenrename | Transport implementation that doesn't detect clashing renames. |
Module | chroot | Implementation of Transport that prevents access to locations above a set |
Module | decorator | Implementation of Transport that decorates another transport. |
Module | fakenfs | Transport implementation that adapts another transport to look like NFS. |
Module | fakevfat | Fake transport with some restrictions of Windows VFAT filesystems. |
Package | ftp | Implementation of Transport over ftp. |
Module | gio_transport | Implementation of Transport over gio. |
Package | http | Base implementation of Transport over http. |
Module | local | Transport for the local filesystem. |
Module | log | Transport decorator that logs transport operations to .bzr.log. |
Module | memory | Implementation of Transport that uses memory for its storage. |
Module | nosmart | Implementation of Transport that never has a smart medium. |
Module | pathfilter | A transport decorator that filters all paths that are passed to it. |
Module | readonly | Implementation of Transport that adapts another transport to be readonly. |
Module | remote | RemoteTransport client for the smart-server. |
Module | sftp | Implementation of Transport over SFTP, using paramiko. |
Module | ssh | Foundation SSH support for SFTP and smart server. |
Module | trace | Implementation of Transport that traces transport operations. |
Module | unlistable | Transport implementation that disables listing to simulate HTTP cheaply. |
From the __init__.py module:
Class | AppendBasedFileStream | A file stream object returned by open_write_stream. |
Class | ConnectedTransport | A transport connected to a remote server. |
Class | FileFileStream | A file stream object returned by open_write_stream. |
Class | FileStream | Base class for FileStreams. |
Class | LateReadError | A helper for transports which pretends to be a readable file. |
Class | Server | A Transport Server. |
Class | Transport | This class encapsulates methods for retrieving or putting a file |
Class | TransportListRegistry | A registry which simplifies tracking available Transports. |
Function | do_catching_redirections | Execute an action with given transport catching redirections. |
Function | get_transport | Open a transport to access a URL or directory. |
Function | get_transport_from_path | Open a transport for a local path. |
Function | get_transport_from_url | Open a transport to access a URL. |
Function | location_to_url | Determine a fully qualified URL from a location string. |
Function | register_lazy_transport | Undocumented |
Function | register_transport | Undocumented |
Function | register_transport_proto | Undocumented |
Function | register_urlparse_netloc_protocol | Ensure that protocol is setup to be used with urlparse netloc parsing. |
Function | unregister_transport | Unregister a transport. |
Class | _CoalescedOffset | A data container for keeping track of coalesced offsets. |
Class | _SharedConnection | A connection shared between several transports. |
Function | _clear_protocol_handlers | Undocumented |
Function | _get_protocol_handlers | Return a dictionary of {urlprefix: [factory]} |
Function | _get_transport_modules | Return a list of the modules providing transports. |
Function | _set_protocol_handlers | Replace the current protocol handlers dictionary. |
Function | _try_transport_factories | Undocumented |
Function | _unregister_urlparse_netloc_protocol | Remove protocol from urlparse netloc parsing. |
WARNING this will remove all build in protocols. Use with care.
Except for tests, you should never use that function. Using it with 'http', for example, will break all http transports.
This will try to interpret location as both a URL and a directory path. It will also lookup the location in directories.
Parameters | location | Unicode or byte string object with a location |
Returns | Byte string with resulting URL | |
Raises | InvalidURL | If the location is already a URL, but not valid. |
Parameters | path | Local path as byte or unicode string |
Returns | Transport object for path |
Parameters | base | a URL |
transports | optional reusable transports list. If not None, created transports will be added to the list. | |
Returns | A new transport optionally sharing its connection with one of possible_transports. |
Parameters | base | either a URL or a directory name. |
transports | optional reusable transports list. If not None, created transports will be added to the list. | |
Returns | A new transport optionally sharing its connection with one of possible_transports. |
This is a facility provided for callers needing to follow redirections silently. The silence is relative: it is the caller responsability to inform the user about each redirection or only inform the user of a user via the exception parameter.
Parameters | action | A callable, what the caller want to do while catching redirections. |
transport | The initial transport used. | |
redirected | A callable receiving the redirected transport and the RedirectRequested exception. | |
Returns | Whatever 'action' returns |