twisted API reference
400 public APIs from twisted (twisted/twisted) — 157 classes, 31 functions, 212 methods. Signatures extracted by static analysis of the actual source.
Repository: twisted/twisted
| Kind | Count |
|---|---|
| Classes | 157 |
| Functions | 31 |
| Methods | 212 |
API list
class
src.twisted._threads._convenience.QuitA flag representing whether a worker has been quit.
method
src.twisted._threads._convenience.Quit.check() -> NoneCheck if the flag has been set.
method
src.twisted._threads._convenience.Quit.set() -> NoneSet the flag if it has not been set.
class
src.twisted._threads._ithreads.AlreadyQuitThis worker worker is dead and cannot execute more instructions.
class
src.twisted._threads._ithreads.IWorkerA worker that can perform some work concurrently.
method
src.twisted._threads._ithreads.IWorker.do() -> NonePerform the given task.
class
src.twisted._threads._memory.MemoryWorkerAn L{IWorker} that queues work for later performance.
method
src.twisted._threads._memory.MemoryWorker.do(work:Callable[[], object]) -> NoneQueue some work for to perform later; see L{createMemoryWorker}.
method
src.twisted._threads._memory.MemoryWorker.quit() -> NoneQuit this worker.
class
src.twisted._threads._team.StatisticsStatistics about a L{Team}'s current activity.
class
src.twisted._threads._team.TeamA composite L{IWorker} implementation.
method
src.twisted._threads._team.Team.do(task:Callable[[], object]) -> NonePerform some work in a worker created by C{createWorker}.
method
src.twisted._threads._team.Team.grow(n:int) -> NoneIncrease the the number of idle workers by C{n}.
method
src.twisted._threads._team.Team.quit() -> NoneStop doing work and shut down all idle workers.
method
src.twisted._threads._team.Team.shrink(n:int | None=None) -> NoneDecrease the number of idle workers by C{n}.
method
src.twisted._threads._threadworker.LockWorker.do(work:Callable[[], None]) -> NoneDo the given work on this thread, with the mutex acquired.
method
src.twisted._threads._threadworker.LockWorker.quit() -> NoneQuit this L{LockWorker}.
class
src.twisted.application.app.CProfileRunnerRunner for the cProfile module.
class
src.twisted.application.app.ProfileRunnerRunner for the standard profile module.
class
src.twisted.application.app.ReactorSelectionMixinProvides options for selecting a reactor to install.
method
src.twisted.application.reactors.IReactorInstaller.install() -> NoneInstall this reactor.
func
src.twisted.application.reactors.installReactor(shortName:str) -> IReactorCoreInstall the reactor with the given C{shortName} attribute.
class
src.twisted.application.runner._exit.ExitStatusStandard exit status codes for system programs.
func
src.twisted.application.runner._exit.exit(status:int | ExitStatus, message:str='') -> NoReturnExit the python interpreter with the given status and an optional message.
class
src.twisted.application.runner._pidfile.AlreadyRunningErrorProcess is already running.
class
src.twisted.application.runner._pidfile.IPIDFileManages a file that remembers a process ID.
method
src.twisted.application.runner._pidfile.IPIDFile.read() -> intRead the process ID stored in this PID file.
method
src.twisted.application.runner._pidfile.IPIDFile.remove() -> NoneRemove this PID file.
class
src.twisted.application.runner._pidfile.InvalidPIDFileErrorPID file contents are invalid.
class
src.twisted.application.runner._pidfile.NoPIDFoundNo PID found in PID file.
class
src.twisted.application.runner._pidfile.NonePIDFilePID file implementation that does nothing.
class
src.twisted.application.runner._pidfile.PIDFileConcrete implementation of L{IPIDFile}.
class
src.twisted.application.runner._runner.RunnerTwisted application runner.
method
src.twisted.application.runner._runner.Runner.run() -> NoneRun this command.
method
src.twisted.application.runner._runner.Runner.startLogging() -> NoneStart the L{twisted.logger} logging system.
func
src.twisted.application.service.Application(name, uid=None, gid=None)Return a compound class.
class
src.twisted.application.service.IProcessProcess running parameters.
class
src.twisted.application.service.IServiceA service.
method
src.twisted.application.service.IService.setName()Set the name of the service.
method
src.twisted.application.service.IService.setServiceParent()Set the parent of the service.
method
src.twisted.application.service.IService.startService()Start the service.
method
src.twisted.application.service.IService.stopService()Stop the service.
class
src.twisted.application.service.IServiceCollectionCollection of services.
method
src.twisted.application.service.IServiceCollection.addService()Add a child service.
method
src.twisted.application.service.IServiceCollection.removeService()Remove a child service.
class
src.twisted.application.service.MultiServiceStraightforward Service Container.
class
src.twisted.application.service.ProcessProcess running parameters.
class
src.twisted.application.service.ServiceBase class for services.
func
src.twisted.application.strports.listen(description:str, factory:interfaces.IProtocolFactory) -> interfaces.IListeningPortListen on a port corresponding to a description.
class
src.twisted.application.twist._options.TwistOptionsCommand line options for C{twist}.
method
src.twisted.application.twist._options.TwistOptions.installReactor(name:str) -> IReactorCoreInstall the reactor.
method
src.twisted.application.twist._options.TwistOptions.opt_log_file(fileName:str) -> NoneLog to file.
method
src.twisted.application.twist._options.TwistOptions.opt_log_format(format:str) -> NoneLog file format.
method
src.twisted.application.twist._options.TwistOptions.opt_log_level(levelName:str) -> NoneSet default log level.
method
src.twisted.application.twist._options.TwistOptions.opt_reactor(name:str) -> NoneThe name of the reactor to use.
method
src.twisted.application.twist._options.TwistOptions.opt_version() -> NoReturnPrint version and exit.
class
src.twisted.application.twist._twist.TwistRun a Twisted application.
method
src.twisted.application.twist._twist.Twist.main(argv:Sequence[str]=sys.argv) -> NoneExecutable entry point for L{Twist}.
method
src.twisted.application.twist._twist.Twist.options(argv:Sequence[str]) -> TwistOptionsParse command line options.
method
src.twisted.application.twist._twist.Twist.run(twistOptions:TwistOptions) -> NoneRun the application service.
method
src.twisted.application.twist._twist.Twist.service(plugin:IServiceMaker, options:Options) -> IServiceCreate the application service.
method
src.twisted.application.twist._twist.Twist.startService(reactor:IReactorCore, service:IService) -> NoneStart the application service.
class
src.twisted.conch.checkers.UserDBA database of users by name, like the stdlib L{pwd} module.
method
src.twisted.conch.checkers.UserDB.getpwnam(username:str) -> UserRecordLookup a user record by name.
class
src.twisted.conch.checkers.UserRecordA record in a UNIX-style password database.
func
src.twisted.conch.checkers.readAuthorizedKeyFile(fileobj:IO[bytes], parseKey:Callable[[bytes], keys.Key]=keys.Key.fromString) -> Iterator[keys.Key]Reads keys from an authorized keys file.
func
src.twisted.conch.client.default.verifyHostKey(transport:SSHClientTransport, host:bytes, pubKey:bytes, fingerprint:str) -> Deferred[bool]Verify a host's key.
class
src.twisted.conch.error.HostKeyChangedThe host key of a remote host has changed.
class
src.twisted.conch.error.UserRejectedKeyThe user interactively rejected a key.
class
src.twisted.conch.insults.helper.TerminalBufferAn in-memory terminal emulator.
method
src.twisted.conch.insults.helper.TerminalBuffer.resetPrivateModes(modes)Disable the given modes.
method
src.twisted.conch.insults.helper.TerminalBuffer.setPrivateModes(modes)Enable the given modes.
method
src.twisted.conch.insults.helper.TerminalBuffer.write(data)Add the given printable bytes to the terminal.
class
src.twisted.conch.insults.insults.modesECMA 48 standardized modes
class
src.twisted.conch.insults.insults.privateModesANSI-Compatible Private Modes
class
src.twisted.conch.insults.window.YieldFocusInput focus manipulation exception
class
src.twisted.conch.interfaces.IConchUserA user who has been authenticated to Cred through Conch.
class
src.twisted.conch.interfaces.ISFTPFileThis represents an open file on the server.
method
src.twisted.conch.interfaces.ISFTPFile.close()Close the file.
method
src.twisted.conch.interfaces.ISFTPFile.getAttrs()Return the attributes for the file.
method
src.twisted.conch.interfaces.ISFTPFile.readChunk(length)Read from the file.
method
src.twisted.conch.interfaces.ISFTPFile.setAttrs()Set the attributes for the file.
method
src.twisted.conch.interfaces.ISFTPFile.writeChunk(data)Write to the file.
class
src.twisted.conch.interfaces.ISFTPServerSFTP subsystem for server-side communication.
method
src.twisted.conch.interfaces.ISFTPServer.makeDirectory(attrs)Make a directory.
method
src.twisted.conch.interfaces.ISFTPServer.makeLink(targetPath)Create a symbolic link.
method
src.twisted.conch.interfaces.ISFTPServer.openDirectory()Open a directory for scanning.
method
src.twisted.conch.interfaces.ISFTPServer.removeFile()Remove the given file.
method
src.twisted.conch.interfaces.ISFTPServer.renameFile(newpath)Rename the given file.
method
src.twisted.conch.interfaces.ISFTPServer.setAttrs(attrs)Set the attributes for the path.
class
src.twisted.conch.interfaces.ISessionSetEnvA session that can set environment variables.
class
src.twisted.conch.manhole.ColoredManholeA REPL which syntax colors input as users type it.
class
src.twisted.conch.manhole.FileWrapperMinimal write-file-like object.
class
src.twisted.conch.manhole.VT102WriterColorizer for Python tokens.
func
src.twisted.conch.manhole_tap.makeService(options)Create a manhole server service.
class
src.twisted.conch.mixin.BufferingMixinMixin which adds write buffering.
method
src.twisted.conch.mixin.BufferingMixin.flush()Flush the buffer immediately.
class
src.twisted.conch.recvline.LoggingWrapper which logs attribute lookups.
class
src.twisted.conch.recvline.RecvLineL{TerminalProtocol} which adds line editing features.
func
src.twisted.conch.ssh._kex.getDHGeneratorAndPrime(kexAlgorithm:bytes) -> tuple[int, int]Get the generator and the prime to use in key exchange.
func
src.twisted.conch.ssh._kex.getHashProcessor(kexAlgorithm:bytes) -> _HashFactoryGet the hash algorithm callable to use in key exchange.
func
src.twisted.conch.ssh._kex.getKex(kexAlgorithm:bytes) -> _IKexAlgorithmGet a description of a named key exchange algorithm.
func
src.twisted.conch.ssh._kex.isEllipticCurve(kexAlgorithm:bytes) -> boolReturns C{True} if C{kexAlgorithm} is an elliptic curve.
class
src.twisted.conch.ssh.address.SSHTransportAddressObject representing an SSH Transport endpoint.
class
src.twisted.conch.ssh.agent.SSHAgentClientThe client side of the SSH agent protocol.
class
src.twisted.conch.ssh.agent.SSHAgentServerThe server side of the SSH agent protocol.
method
src.twisted.conch.ssh.channel.SSHChannel.closed()Called when the channel is closed.
method
src.twisted.conch.ssh.channel.SSHChannel.dataReceived(data)Called when we receive data.
method
src.twisted.conch.ssh.channel.SSHChannel.write(data)Write some data to the channel.
method
src.twisted.conch.ssh.channel.SSHChannel.writeSequence(data)Part of the Transport interface.
func
src.twisted.conch.ssh.common.NS(t:bytes | str) -> bytesnet string
func
src.twisted.conch.ssh.common.getNS(s:bytes, count:int=1) -> Sequence[bytes]get net string
class
src.twisted.conch.ssh.connection.SSHConnectionAn implementation of the 'ssh-connection' service.
method
src.twisted.conch.ssh.connection.SSHConnection.gotGlobalRequest(requestType, data)We got a global request.
method
src.twisted.conch.ssh.connection.SSHConnection.sendClose(channel)Close a channel.
method
src.twisted.conch.ssh.connection.SSHConnection.sendData(channel, data)Send data to a channel.
method
src.twisted.conch.ssh.connection.SSHConnection.ssh_REQUEST_FAILURE(packet)Our global request failed.
class
src.twisted.conch.ssh.factory.SSHFactoryA Factory for SSH servers.
method
src.twisted.conch.ssh.factory.SSHFactory.startFactory() -> NoneCheck for public and private keys.
class
src.twisted.conch.ssh.keys.BadKeyErrorRaised when a key isn't what we expected from it.
class
src.twisted.conch.ssh.keys.KeyAn object representing a key.
method
src.twisted.conch.ssh.keys.Key.blob()Return the public key blob for this key.
method
src.twisted.conch.ssh.keys.Key.data() -> dict[str, Any]Return the values of the public key as a dictionary.
method
src.twisted.conch.ssh.keys.Key.fromFile(filename, type=None, passphrase=None)Load a key from a file.
method
src.twisted.conch.ssh.keys.Key.isPublic()Check if this instance is a public key.
method
src.twisted.conch.ssh.keys.Key.sign(data:bytes, signatureType:bytes | None=None) -> bytesSign some data with this key.
method
src.twisted.conch.ssh.keys.Key.size()Return the size of the object we wrap.
method
src.twisted.conch.ssh.keys.Key.type() -> Literal['RSA', 'DSA', 'EC', 'Ed25519']Return the type of the object we wrap.
method
src.twisted.conch.ssh.keys.Key.verify(signature, data)Verify a signature using this key.
class
src.twisted.conch.ssh.session.SSHSessionA generalized implementation of an SSH session.
class
src.twisted.conch.ssh.session.SSHSessionProcessProtocolI am both an L{IProcessProtocol} and an L{ITransport}.
method
src.twisted.conch.ssh.session.SSHSessionProcessProtocol.errConnectionLost()See outConnectionLost().
method
src.twisted.conch.ssh.userauth.SSHUserAuthClient.askForAuth(kind:bytes, extraData:bytes) -> NoneSend a C{MSG_USERAUTH_REQUEST}.
method
src.twisted.conch.ssh.userauth.SSHUserAuthClient.auth_password() -> boolTry to authenticate with a password.
method
src.twisted.conch.ssh.userauth.SSHUserAuthClient.auth_publickey() -> Deferred[bool]Try to authenticate with a public key.
method
src.twisted.conch.ssh.userauth.SSHUserAuthClient.getPublicKey() -> Key | NoneReturn a public key for the user.
method
src.twisted.conch.ssh.userauth.SSHUserAuthClient.signData(publicKey:keys.Key, signData:bytes) -> Deferred[bytes] | NoneSign the given data with the given public key.
method
src.twisted.conch.ssh.userauth.SSHUserAuthClient.ssh_USERAUTH_PK_OK_publickey(packet)This is MSG_USERAUTH_PK.
method
src.twisted.conch.ssh.userauth.SSHUserAuthClient.tryAuth(kind:bytes) -> None | Deferred[bool]Dispatch to an authentication method.
method
src.twisted.conch.tap.Options.addChecker(checker)Add the checker specified.
class
src.twisted.conch.telnet.Telnet@ivar commandMap: A mapping of bytes to callables.
class
src.twisted.conch.ui.ansi.AnsiParserParser class for ANSI codes.
method
src.twisted.conch.ui.ansi.AnsiParser.parseColor(str)Handle a single ANSI color sequence
func
src.twisted.cred._digest.calcHA2(algo, pszMethod, pszDigestUri, pszQop, pszHEntity)Compute H(A2) from RFC 2617.
class
src.twisted.cred.checkers.FilePasswordDBA file-based, text-based username/password database.
method
src.twisted.cred.checkers.FilePasswordDB.getUser(username:bytes) -> tuple[bytes, bytes]Look up the credentials for a username.
class
src.twisted.cred.checkers.InMemoryUsernamePasswordDatabaseDontUseAn extremely simple credentials checker.
method
src.twisted.cred.checkers.InMemoryUsernamePasswordDatabaseDontUse.addUser(username:bytes, password:bytes) -> NoneSet a user's password.
class
src.twisted.cred.credentials.CramMD5CredentialsAn encapsulation of some CramMD5 hashed credentials.
class
src.twisted.cred.credentials.DigestedCredentialsYet Another Simple HTTP Digest authentication scheme.
class
src.twisted.cred.credentials.IAnonymousI am an explicitly anonymous request for access.
class
src.twisted.cred.credentials.ICredentialsI check credentials.
class
src.twisted.cred.credentials.IUsernameHashedPasswordI encapsulate a username and a hashed password.
class
src.twisted.cred.credentials.IUsernamePasswordI encapsulate a username and a plaintext password.
class
src.twisted.cred.error.LoginDeniedThe realm rejected this login for some reason.
class
src.twisted.cred.error.LoginFailedThe user's request to log in failed for some reason.
class
src.twisted.cred.error.UnauthorizedStandard unauthorized error.
class
src.twisted.cred.error.UnauthorizedLoginThe user was not authorized to log in.
class
src.twisted.cred.portal.PortalA mediator between clients and a realm.
class
src.twisted.cred.strcred.StrcredExceptionBase exception class for strcred.
class
src.twisted.enterprise.adbapi.ConnectionA wrapper for a DB-API connection instance.
class
src.twisted.enterprise.adbapi.ConnectionLostThis exception means that a db connection has been lost.
method
src.twisted.enterprise.adbapi.ConnectionPool.start()Start the connection pool.
class
src.twisted.enterprise.adbapi.TransactionA lightweight wrapper for a DB-API 'cursor' object.
func
src.twisted.internet._deprecate.deprecatedGnomeReactor(name:str, version:Version) -> NoneEmit a deprecation warning about a gnome-related reactor.
class
src.twisted.internet._dumbwin32proc.ProcessA process that integrates with the Twisted event loop.
method
src.twisted.internet._dumbwin32proc.Process.closeStdin()Close the process' stdin.
method
src.twisted.internet._dumbwin32proc.Process.write(data)Write data to the process' stdin.
method
src.twisted.internet._dumbwin32proc.Process.writeSequence(seq)Write data to the process' stdin.
class
src.twisted.internet._glibbase.GlibReactorBaseBase class for GObject event loop reactors.
method
src.twisted.internet._glibbase.GlibReactorBase.callLater(*args, **kwargs)Schedule a C{DelayedCall}.
method
src.twisted.internet._glibbase.GlibReactorBase.crash()Crash the reactor.
method
src.twisted.internet._glibbase.GlibReactorBase.run(installSignalHandlers=True)Run the reactor.
method
src.twisted.internet._glibbase.GlibReactorBase.stop()Stop the reactor.
class
src.twisted.internet._glibbase.GlibWakerRun scheduled events after waking up.
class
src.twisted.internet._multicast.MulticastMixinImplement multicast functionality.
method
src.twisted.internet._multicast.MulticastMixin.joinGroup(addr:str, interface:str='') -> Deferred[None]@see: L{IMulticastTransport.joinGroup}
method
src.twisted.internet._multicast.MulticastMixin.leaveGroup(addr:str, interface:str='') -> Deferred[None]@see: L{IMulticastTransport.leaveGroup}
method
src.twisted.internet._multicast.MulticastMixin.setOutgoingInterface(addr:str | int) -> Deferred[int]@see: L{IMulticastTransport.setOutgoingInterface}
func
src.twisted.internet._newtls.startTLS(transport, contextFactory, normal, bypass)Add a layer of SSL to a transport.
class
src.twisted.internet._posixserialport.SerialPortA select()able serial device, acting as a transport.
class
src.twisted.internet._resolver.HostResolutionThe in-progress resolution of a given hostname.
class
src.twisted.internet._sslverify.CertificateAn x509 certificate.
method
src.twisted.internet._sslverify.Certificate.load(requestData:bytes, format:int=crypto.FILETYPE_ASN1, args:tuple[Any, ...]=()) -> _SelfLoad a certificate from an ASN.1- or PEM-format string.
method
src.twisted.internet._sslverify.Certificate.loadPEM(data:bytes) -> CertificateLoad a certificate from a PEM-format data string.
class
src.twisted.internet._sslverify.CertificateRequestAn x509 certificate request.
class
src.twisted.internet._sslverify.ClientTLSOptionsClient creator for TLS.
method
src.twisted.internet._sslverify.ClientTLSOptions.clientConnectionForTLS(tlsProtocol:TLSMemoryBIOProtocol) -> ConnectionCreate a TLS connection for a client.
class
src.twisted.internet._sslverify.DistinguishedNameIdentify and describe an entity.
class
src.twisted.internet._sslverify.IOpenSSLTrustRootTrust settings for an OpenSSL context.
class
src.twisted.internet._sslverify.OpenSSLCipherA representation of an OpenSSL cipher.
class
src.twisted.internet._sslverify.PrivateCertificateAn x509 certificate and private key.
class
src.twisted.internet._sslverify.TLSVersionTLS versions that we can negotiate with the client/server.
class
src.twisted.internet.abstract.FileDescriptorAn object which can be operated on by select().
method
src.twisted.internet.abstract.FileDescriptor.connectionLost(reason)The connection was lost.
method
src.twisted.internet.abstract.FileDescriptor.doWrite()Called when data can be written.
method
src.twisted.internet.abstract.FileDescriptor.stopConsuming()Stop consuming data.
method
src.twisted.internet.abstract.FileDescriptor.stopWriting()Stop waiting for write availability.
method
src.twisted.internet.abstract.FileDescriptor.write(data:bytes) -> NoneReliably write some data.
method
src.twisted.internet.abstract.FileDescriptor.writeSequence(iovec:Iterable[bytes]) -> NoneReliably write a sequence of data.
method
src.twisted.internet.abstract.FileDescriptor.writeSomeData(data:bytes) -> int | BaseExceptionWrite as much as possible of the given data, immediately.
func
src.twisted.internet.abstract.isIPv6Address(addr:str) -> boolDetermine whether the given string represents an IPv6 address.
class
src.twisted.internet.address.UNIXAddressObject representing a UNIX socket endpoint.
func
src.twisted.internet.asyncioreactor.install(eventloop=None)Install an asyncio-based reactor.
class
src.twisted.internet.base.BaseConnectorBasic implementation of L{IConnector}.
method
src.twisted.internet.base.BaseConnector.connect() -> NoneStart connection to remote server.
method
src.twisted.internet.base.BaseConnector.disconnect() -> NoneDisconnect whatever our state is.
method
src.twisted.internet.base.BaseConnector.stopConnecting() -> NoneStop attempting to connect.
class
src.twisted.internet.base.BasePortBasic implementation of a ListeningPort.
method
src.twisted.internet.base.BasePort.doWrite() -> Failure | NoneRaises a RuntimeError
class
src.twisted.internet.base.ReactorBaseDefault base class for Reactors.
method
src.twisted.internet.base.ReactorBase.crash() -> NoneSee twisted.internet.interfaces.IReactorCore.crash.
method
src.twisted.internet.base.ReactorBase.disconnectAll() -> NoneDisconnect every reader, and writer in the system.
method
src.twisted.internet.base.ReactorBase.fireSystemEvent(eventType:str) -> NoneSee twisted.internet.interfaces.IReactorCore.fireSystemEvent.
method
src.twisted.internet.base.ReactorBase.iterate(delay:float=0.0) -> NoneSee twisted.internet.interfaces.IReactorCore.iterate.
method
src.twisted.internet.base.ReactorBase.resolve(name:str, timeout:Sequence[int]=(1, 3, 11, 45)) -> Deferred[str]Return a Deferred that will resolve a hostname.
method
src.twisted.internet.base.ReactorBase.runUntilCurrent() -> NoneRun all pending timed calls.
method
src.twisted.internet.base.ReactorBase.sigBreak(number:int, frame:FrameType | None=None) -> NoneHandle a SIGBREAK interrupt.
method
src.twisted.internet.base.ReactorBase.sigInt(number:int, frame:FrameType | None=None) -> NoneHandle a SIGINT interrupt.
method
src.twisted.internet.base.ReactorBase.sigTerm(number:int, frame:FrameType | None=None) -> NoneHandle a SIGTERM interrupt.
method
src.twisted.internet.base.ReactorBase.stop() -> NoneSee twisted.internet.interfaces.IReactorCore.stop.
method
src.twisted.internet.base.ReactorBase.wakeUp() -> NoneWake up the event loop.
class
src.twisted.internet.cfreactor.CFReactorThe CoreFoundation reactor.
method
src.twisted.internet.cfreactor.CFReactor.crash()Implement L{IReactorCore.crash}
method
src.twisted.internet.cfreactor.CFReactor.stop() -> NoneImplement L{IReactorCore.stop}.
class
src.twisted.internet.defer.CancelledErrorThis error is raised by default when a L{Deferred} is cancelled.
class
src.twisted.internet.defer.DebugInfoDeferred debug helper.
class
src.twisted.internet.defer.DeferredThis is a callback which will be put off until later.
method
src.twisted.internet.defer.Deferred.callback(result:_SelfResultT | Failure) -> NoneRun all success callbacks that have been added to this L{Deferred}.
method
src.twisted.internet.defer.Deferred.cancel() -> NoneCancel this L{Deferred}.
method
src.twisted.internet.defer.Deferred.chainDeferred(d:Deferred[_SelfResultT]) -> Deferred[None]Chain another L{Deferred} to this L{Deferred}.
method
src.twisted.internet.defer.Deferred.errback(fail:Failure | BaseException | None=None) -> NoneRun all error callbacks that have been added to this L{Deferred}.
method
src.twisted.internet.defer.Deferred.fromFuture(future:Future[_SelfResultT]) -> Deferred[_SelfResultT]Adapt a L{Future} to a L{Deferred}.
method
src.twisted.internet.defer.Deferred.pause() -> NoneStop processing on a L{Deferred} until L{unpause}() is called.
method
src.twisted.internet.defer.Deferred.unpause() -> NoneProcess all callbacks made since L{pause}() was called.
class
src.twisted.internet.defer.DeferredListL{DeferredList} is a tool for collecting the results of several Deferreds.
method
src.twisted.internet.defer.DeferredList.cancel() -> NoneCancel this L{DeferredList}.
class
src.twisted.internet.defer.DeferredLockA lock for event driven systems.
method
src.twisted.internet.defer.DeferredLock.acquire() -> Deferred[Self]Attempt to acquire the lock.
method
src.twisted.internet.defer.DeferredLock.release() -> NoneRelease the lock.
class
src.twisted.internet.defer.DeferredQueueAn event driven queue.
method
src.twisted.internet.defer.DeferredQueue.get() -> Deferred[_T]Attempt to retrieve and remove an object from the queue.
method
src.twisted.internet.defer.DeferredQueue.put(obj:_T) -> NoneAdd an object to this queue.
class
src.twisted.internet.defer.DeferredSemaphoreA semaphore for event driven systems.
method
src.twisted.internet.defer.DeferredSemaphore.acquire() -> Deferred[Self]Attempt to acquire the token.
method
src.twisted.internet.defer.DeferredSemaphore.release() -> NoneRelease the token.
class
src.twisted.internet.defer.FailureGroupMore than one failure occurred.
class
src.twisted.internet.defer.TimeoutErrorThis error is raised by default when a L{Deferred} times out.
func
src.twisted.internet.defer.execute(callable:Callable[_P, _T], *args:_P.args, **kwargs:_P.kwargs) -> Deferred[_T]Create a L{Deferred} from a callable and arguments.
func
src.twisted.internet.defer.fail(result:Failure | BaseException | None=None) -> Deferred[Any]Return a L{Deferred} that has already had C{.errback(result)} called.
func
src.twisted.internet.defer.getDebugging() -> boolDetermine whether L{Deferred} debugging is enabled.
func
src.twisted.internet.defer.logError(err:Failure) -> FailureLog and return failure.
func
src.twisted.internet.defer.returnValue(val:object) -> NoReturnReturn val from a L{inlineCallbacks} generator.
func
src.twisted.internet.defer.setDebugging(on:bool) -> NoneEnable or disable L{Deferred} debugging.
func
src.twisted.internet.defer.succeed(result:_T) -> Deferred[_T]Return a L{Deferred} that has already had C{.callback(result)} called.
class
src.twisted.internet.endpoints.TCP4ClientEndpointTCP client endpoint with an IPv4 configuration.
class
src.twisted.internet.endpoints.TCP6ClientEndpointTCP client endpoint with an IPv6 configuration.
class
src.twisted.internet.endpoints.UNIXClientEndpointUnixSocket client endpoint.
class
src.twisted.internet.endpoints.UNIXServerEndpointUnixSocket server endpoint.
class
src.twisted.internet.epollreactor.EPollReactorA reactor that uses epoll(7).
method
src.twisted.internet.epollreactor.EPollReactor.doPoll(timeout)Poll the poller for new events.
func
src.twisted.internet.epollreactor.install()Install the epoll() reactor.
class
src.twisted.internet.error.ConnectInProgressErrorA connect operation was started and isn't done yet.
class
src.twisted.internet.error.ConnectionClosedConnection was closed, whether cleanly or non-cleanly.
class
src.twisted.internet.error.InvalidAddressErrorAn invalid address was specified (i.e.
class
src.twisted.internet.error.MulticastJoinErrorAn attempt to join a multicast group failed.
class
src.twisted.internet.error.ReactorAlreadyInstalledErrorCould not install reactor because one is already installed.
func
src.twisted.internet.fdesc.writeToFD(fd, data)Write data to file descriptor.
class
src.twisted.internet.gireactor.GIReactorGObject-introspection event loop reactor.
class
src.twisted.internet.gireactor.PortableGIReactorPortable GObject Introspection event loop reactor.
method
src.twisted.internet.gireactor.PortableGIReactor.simulate() -> NoneFor compatibility only.
class
src.twisted.internet.glib2reactor.Glib2ReactorThe reactor using the glib mainloop.
class
src.twisted.internet.gtk2reactor.Gtk2ReactorPyGTK+ 2 event loop reactor.
class
src.twisted.internet.interfaces.IAcceptableCiphersA list of acceptable ciphers for a TLS context.
class
src.twisted.internet.interfaces.IAddressAn address, e.g.
class
src.twisted.internet.interfaces.ICipherA TLS cipher.
method
src.twisted.internet.interfaces.IConnector.connect() -> NoneTry to connect to remote address.
method
src.twisted.internet.interfaces.IConnector.disconnect() -> NoneDisconnect regardless of the connection state.
method
src.twisted.internet.interfaces.IConnector.getDestination() -> IAddressReturn destination this will try to connect to.
method
src.twisted.internet.interfaces.IConnector.stopConnecting() -> NoneStop attempting to connect.
class
src.twisted.internet.interfaces.IConsumerA consumer consumes data from a producer.
method
src.twisted.internet.interfaces.IConsumer.registerProducer(streaming:bool) -> NoneRegister to receive data from a producer.
method
src.twisted.internet.interfaces.IConsumer.write() -> NoneThe producer will write data by calling this method.
class
src.twisted.internet.interfaces.IDelayedCallA scheduled call.
method
src.twisted.internet.interfaces.IDelayedCall.cancel() -> NoneCancel the scheduled call.
method
src.twisted.internet.interfaces.IDelayedCall.delay() -> NoneDelay the scheduled call.
method
src.twisted.internet.interfaces.IDelayedCall.getTime() -> floatGet time when delayed call will happen.
method
src.twisted.internet.interfaces.IDelayedCall.reset() -> NoneReset the scheduled call's timer.
method
src.twisted.internet.interfaces.IFileDescriptor.connectionLost() -> NoneCalled when the connection was lost.
class
src.twisted.internet.interfaces.IHalfCloseableDescriptorA descriptor that can be half-closed.
method
src.twisted.internet.interfaces.IHalfCloseableDescriptor.readConnectionLost() -> NoneIndicates read connection was lost.
method
src.twisted.internet.interfaces.IHalfCloseableDescriptor.writeConnectionLost() -> NoneIndicates write connection was lost.
class
src.twisted.internet.interfaces.IListeningPortA listening port.
method
src.twisted.internet.interfaces.IListeningPort.getHost() -> IAddressGet the host that this port is listening for.
method
src.twisted.internet.interfaces.IListeningPort.startListening() -> NoneStart listening on this port.
method
src.twisted.internet.interfaces.IListeningPort.stopListening() -> Deferred[None] | NoneStop listening on this port.
class
src.twisted.internet.interfaces.IMulticastTransportAdditional functionality for multicast UDP.
method
src.twisted.internet.interfaces.IMulticastTransport.getLoopbackMode() -> boolReturn if loopback mode is enabled.
method
src.twisted.internet.interfaces.IMulticastTransport.getTTL() -> intGet time to live for multicast packets.
method
src.twisted.internet.interfaces.IMulticastTransport.joinGroup(interface:str='') -> Deferred[None]Join a multicast group.
method
src.twisted.internet.interfaces.IMulticastTransport.leaveGroup(interface:str='') -> Deferred[None]Leave multicast group, return L{Deferred} of success.
method
src.twisted.internet.interfaces.IMulticastTransport.setLoopbackMode() -> NoneSet if loopback mode is enabled.
method
src.twisted.internet.interfaces.IMulticastTransport.setTTL() -> NoneSet time to live on multicast packets.
class
src.twisted.internet.interfaces.IProcessProtocolInterface for process-related event handlers.
method
src.twisted.internet.interfaces.IProcessProtocol.childDataReceived(data:bytes) -> NoneCalled when data arrives from the child process.
method
src.twisted.internet.interfaces.IProcessProtocol.makeConnection() -> NoneCalled when the process has been created.
method
src.twisted.internet.interfaces.IProcessProtocol.processExited() -> NoneCalled when the child process exits.
class
src.twisted.internet.interfaces.IProcessTransportA process transport.
method
src.twisted.internet.interfaces.IProcessTransport.closeStderr() -> NoneClose stderr.
method
src.twisted.internet.interfaces.IProcessTransport.closeStdin() -> NoneClose stdin after all data has been written out.
method
src.twisted.internet.interfaces.IProcessTransport.closeStdout() -> NoneClose stdout.
method
src.twisted.internet.interfaces.IProcessTransport.loseConnection() -> NoneClose stdin, stderr and stdout.
method
src.twisted.internet.interfaces.IProcessTransport.signalProcess() -> NoneSend a signal to the process.
class
src.twisted.internet.interfaces.IProducerA producer produces data for a consumer.
method
src.twisted.internet.interfaces.IProducer.stopProducing() -> NoneStop producing data.
class
src.twisted.internet.interfaces.IProtocolFactoryInterface for protocol factories.
class
src.twisted.internet.interfaces.IReactorCoreCore methods that a Reactor must implement.
method
src.twisted.internet.interfaces.IReactorCore.callWhenRunning(*args:object, **kwargs:object) -> Any | NoneCall a function when the reactor is running.
method
src.twisted.internet.interfaces.IReactorCore.fireSystemEvent() -> NoneFire a system-wide event.
class
src.twisted.internet.interfaces.IReactorMulticastUDP socket methods that support multicast.
class
src.twisted.internet.interfaces.IReactorThreadsDispatch methods to be run in threads.
class
src.twisted.internet.interfaces.IReactorTimeTime methods that a Reactor should implement.
method
src.twisted.internet.interfaces.IReactorTime.callLater(callable:Callable[..., Any], *args:object, **kwargs:object) -> IDelayedCallCall a function later.
method
src.twisted.internet.interfaces.IReactorTime.seconds() -> floatGet the current time in seconds.
class
src.twisted.internet.interfaces.IReactorUDPUDP socket methods.
class
src.twisted.internet.interfaces.IReactorUNIXUNIX socket methods.
method
src.twisted.internet.interfaces.IReactorUNIX.connectUNIX(factory:ClientFactory, timeout:float=30, checkPID:bool=False) -> IConnectorConnect a client protocol to a UNIX socket.
method
src.twisted.internet.interfaces.IReactorUNIX.listenUNIX(factory:Factory, backlog:int=50, mode:int=438, wantPID:bool=False) -> IListeningPortListen on a UNIX socket.
class
src.twisted.internet.interfaces.IReactorUNIXDatagramDatagram UNIX socket methods.
method
src.twisted.internet.interfaces.IReactorUNIXDatagram.listenUNIXDatagram(protocol:DatagramProtocol, maxPacketSize:int, mode:int) -> IListeningPortListen on a datagram UNIX socket.
class
src.twisted.internet.interfaces.IReactorWin32EventsWin32 Event API methods @since: 10.2
method
src.twisted.internet.interfaces.IReactorWin32Events.addEvent(fd:FileDescriptor, action:str) -> NoneAdd a new win32 event to the event loop.
method
src.twisted.internet.interfaces.IReactorWin32Events.removeEvent() -> NoneRemove an event.
class
src.twisted.internet.interfaces.IReadDescriptorAn L{IFileDescriptor} that can read.
class
src.twisted.internet.interfaces.IReadWriteDescriptorAn L{IFileDescriptor} that can both read and write.
class
src.twisted.internet.interfaces.ISSLTransportA SSL/TLS based transport.
method
src.twisted.internet.interfaces.IServiceCollection.addService() -> NoneAdd a service to this collection.
method
src.twisted.internet.interfaces.IServiceCollection.removeService() -> NoneRemove a service from this collection.
class
src.twisted.internet.interfaces.ISystemHandleAn object that wraps a networking OS-specific handle.
method
src.twisted.internet.interfaces.ISystemHandle.getHandle() -> objectReturn a system- and reactor-specific handle.
class
src.twisted.internet.interfaces.ITCPTransportA TCP based transport.
method
src.twisted.internet.interfaces.ITCPTransport.abortConnection() -> NoneClose the connection abruptly.
method
src.twisted.internet.interfaces.ITCPTransport.getHost() -> IPv4Address | IPv6AddressReturns L{IPv4Address} or L{IPv6Address}.
method
src.twisted.internet.interfaces.ITCPTransport.getPeer() -> IPv4Address | IPv6AddressReturns L{IPv4Address} or L{IPv6Address}.
method
src.twisted.internet.interfaces.ITCPTransport.getTcpKeepAlive() -> boolReturn if C{SO_KEEPALIVE} is enabled.
method
src.twisted.internet.interfaces.ITCPTransport.getTcpNoDelay() -> boolReturn if C{TCP_NODELAY} is enabled.
method
src.twisted.internet.interfaces.ITCPTransport.loseWriteConnection() -> NoneHalf-close the write side of a TCP connection.
method
src.twisted.internet.interfaces.ITCPTransport.setTcpKeepAlive() -> NoneEnable/disable C{SO_KEEPALIVE}.
method
src.twisted.internet.interfaces.ITCPTransport.setTcpNoDelay() -> NoneEnable/disable C{TCP_NODELAY}.
class
src.twisted.internet.interfaces.ITLSTransportA TCP transport that supports switching to TLS midstream.
method
src.twisted.internet.interfaces.ITLSTransport.startTLS() -> NoneInitiate TLS negotiation.
class
src.twisted.internet.interfaces.ITransportI am a transport for bytes.
method
src.twisted.internet.interfaces.ITransport.getPeer() -> IAddressGet the remote address of this connection.
method
src.twisted.internet.interfaces.ITransport.loseConnection() -> NoneClose my connection, after writing all pending data.
class
src.twisted.internet.interfaces.IUDPTransportTransport for UDP DatagramProtocols.
method
src.twisted.internet.interfaces.IUDPTransport.connect(port:int) -> NoneConnect the transport to an address.
method
src.twisted.internet.interfaces.IUDPTransport.getHost() -> IPv4Address | IPv6AddressGet this port's host address.
method
src.twisted.internet.interfaces.IUDPTransport.setBroadcastAllowed() -> NoneSet whether this port may broadcast.
method
src.twisted.internet.interfaces.IUDPTransport.stopListening() -> Deferred[None] | NoneStop listening on this port.
method
src.twisted.internet.interfaces.IUDPTransport.write(addr:tuple[str, int] | None) -> NoneWrite packet to given address.
class
src.twisted.internet.interfaces.IUNIXDatagramConnectedTransportTransport for UDP ConnectedPacketProtocols.
method
src.twisted.internet.interfaces.IUNIXDatagramConnectedTransport.getHost() -> UNIXAddressReturns L{UNIXAddress}.
method
src.twisted.internet.interfaces.IUNIXDatagramConnectedTransport.getPeer() -> UNIXAddressReturns L{UNIXAddress}.
method
src.twisted.internet.interfaces.IUNIXDatagramConnectedTransport.write() -> NoneWrite packet to address we are connected to.
class
src.twisted.internet.interfaces.IUNIXDatagramTransportTransport for UDP PacketProtocols.
method
src.twisted.internet.interfaces.IUNIXDatagramTransport.getHost() -> UNIXAddressReturns L{UNIXAddress}.
method
src.twisted.internet.interfaces.IUNIXDatagramTransport.write(addr:str) -> NoneWrite packet to given address.
class
src.twisted.internet.interfaces.IUNIXTransportTransport for stream-oriented unix domain connections.
class
src.twisted.internet.interfaces.IWriteDescriptorAn L{IFileDescriptor} that can write.
method
src.twisted.internet.interfaces.IWriteDescriptor.doWrite() -> Failure | NoneSome data can be written to your descriptor.
class
src.twisted.internet.iocpreactor.abstract.FileHandleFile handle that can read and write asynchronously
method
src.twisted.internet.iocpreactor.abstract.FileHandle.connectionLost(reason)The connection was lost.
method
src.twisted.internet.iocpreactor.abstract.FileHandle.stopConsuming()Stop consuming data.
method
src.twisted.internet.iocpreactor.abstract.FileHandle.write(data)Reliably write some data.
method
src.twisted.internet.iocpreactor.tcp.Connection.registerProducer(producer, streaming)Register a producer.
method
src.twisted.internet.iocpreactor.tcp.Connection.unregisterProducer()Unregister a producer.
method
src.twisted.internet.iocpreactor.tcp.Port.connectionLost(reason)Cleans up the socket.
class
src.twisted.internet.iocpreactor.tcp.ServerServerside socket-stream connection class.
method
src.twisted.internet.iocpreactor.tcp.Server.getHost()Returns an IPv4Address.
method
src.twisted.internet.iocpreactor.tcp.Server.getPeer()Returns an IPv4Address.
class
src.twisted.internet.iocpreactor.udp.MulticastPortUDP Port that supports multicasting.
class
src.twisted.internet.iocpreactor.udp.PortUDP port, listening for packets.
method
src.twisted.internet.iocpreactor.udp.Port.connect(host, port)'Connect' to remote server.
method
src.twisted.internet.iocpreactor.udp.Port.connectionLost(reason=None)Cleans up my socket.
method
src.twisted.internet.iocpreactor.udp.Port.getHandle()Return a socket object.
method
src.twisted.internet.iocpreactor.udp.Port.write(datagram, addr=None)Write a datagram.
func
src.twisted.internet.kqreactor.install()Install the kqueue() reactor.
func
src.twisted.internet.main.installReactor(reactor)Install reactor C{reactor}.
class
src.twisted.internet.pollreactor.PollReactorA reactor that uses poll(2).
method
src.twisted.internet.pollreactor.PollReactor.doPoll(timeout)Poll the poller for new events.
func
src.twisted.internet.pollreactor.install()Install the poll() reactor.
class
src.twisted.internet.posixbase.PosixReactorBaseA basis for reactors that use file descriptors.
class
src.twisted.internet.process.PTYProcessAn operating-system Process that uses PTY support.
class
src.twisted.internet.process.ProcessAn operating-system Process.
func
src.twisted.internet.process.reapAllProcesses() -> NoneReap all registered processes.
class
src.twisted.internet.protocol.AbstractDatagramProtocolAbstract protocol for datagram-oriented transports, e.g.
method
src.twisted.internet.protocol.AbstractDatagramProtocol.datagramReceived(datagram:bytes, addr:tuple[str, int]) -> NoneCalled when a datagram is received.
method
src.twisted.internet.protocol.AbstractDatagramProtocol.makeConnection(transport:IUDPTransport) -> NoneMake a connection to a transport and a server.
class
src.twisted.internet.protocol.BaseProtocolThis is the abstract superclass of all protocols.
class
src.twisted.internet.protocol.ClientCreatorClient connections that do not require a factory.
About this data
These signatures were extracted from the public source of twisted/twisted
using Python's ast module. Argument names, default values,
type annotations and return types are taken verbatim from the code.
Implementation bodies are never stored. See
how it works for details.