sdkagent

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

KindCount
Classes157
Functions31
Methods212

API list

classsrc.twisted._threads._convenience.Quit
A flag representing whether a worker has been quit.
methodsrc.twisted._threads._convenience.Quit.check() -> None
Check if the flag has been set.
methodsrc.twisted._threads._convenience.Quit.set() -> None
Set the flag if it has not been set.
classsrc.twisted._threads._ithreads.AlreadyQuit
This worker worker is dead and cannot execute more instructions.
classsrc.twisted._threads._ithreads.IWorker
A worker that can perform some work concurrently.
methodsrc.twisted._threads._ithreads.IWorker.do() -> None
Perform the given task.
classsrc.twisted._threads._memory.MemoryWorker
An L{IWorker} that queues work for later performance.
methodsrc.twisted._threads._memory.MemoryWorker.do(work:Callable[[], object]) -> None
Queue some work for to perform later; see L{createMemoryWorker}.
methodsrc.twisted._threads._memory.MemoryWorker.quit() -> None
Quit this worker.
classsrc.twisted._threads._team.Statistics
Statistics about a L{Team}'s current activity.
classsrc.twisted._threads._team.Team
A composite L{IWorker} implementation.
methodsrc.twisted._threads._team.Team.do(task:Callable[[], object]) -> None
Perform some work in a worker created by C{createWorker}.
methodsrc.twisted._threads._team.Team.grow(n:int) -> None
Increase the the number of idle workers by C{n}.
methodsrc.twisted._threads._team.Team.quit() -> None
Stop doing work and shut down all idle workers.
methodsrc.twisted._threads._team.Team.shrink(n:int | None=None) -> None
Decrease the number of idle workers by C{n}.
methodsrc.twisted._threads._threadworker.LockWorker.do(work:Callable[[], None]) -> None
Do the given work on this thread, with the mutex acquired.
methodsrc.twisted._threads._threadworker.LockWorker.quit() -> None
Quit this L{LockWorker}.
classsrc.twisted.application.app.CProfileRunner
Runner for the cProfile module.
classsrc.twisted.application.app.ProfileRunner
Runner for the standard profile module.
classsrc.twisted.application.app.ReactorSelectionMixin
Provides options for selecting a reactor to install.
methodsrc.twisted.application.reactors.IReactorInstaller.install() -> None
Install this reactor.
funcsrc.twisted.application.reactors.installReactor(shortName:str) -> IReactorCore
Install the reactor with the given C{shortName} attribute.
classsrc.twisted.application.runner._exit.ExitStatus
Standard exit status codes for system programs.
funcsrc.twisted.application.runner._exit.exit(status:int | ExitStatus, message:str='') -> NoReturn
Exit the python interpreter with the given status and an optional message.
classsrc.twisted.application.runner._pidfile.AlreadyRunningError
Process is already running.
classsrc.twisted.application.runner._pidfile.IPIDFile
Manages a file that remembers a process ID.
methodsrc.twisted.application.runner._pidfile.IPIDFile.read() -> int
Read the process ID stored in this PID file.
methodsrc.twisted.application.runner._pidfile.IPIDFile.remove() -> None
Remove this PID file.
classsrc.twisted.application.runner._pidfile.InvalidPIDFileError
PID file contents are invalid.
classsrc.twisted.application.runner._pidfile.NoPIDFound
No PID found in PID file.
classsrc.twisted.application.runner._pidfile.NonePIDFile
PID file implementation that does nothing.
classsrc.twisted.application.runner._pidfile.PIDFile
Concrete implementation of L{IPIDFile}.
classsrc.twisted.application.runner._runner.Runner
Twisted application runner.
methodsrc.twisted.application.runner._runner.Runner.run() -> None
Run this command.
methodsrc.twisted.application.runner._runner.Runner.startLogging() -> None
Start the L{twisted.logger} logging system.
funcsrc.twisted.application.service.Application(name, uid=None, gid=None)
Return a compound class.
classsrc.twisted.application.service.IProcess
Process running parameters.
classsrc.twisted.application.service.IService
A service.
methodsrc.twisted.application.service.IService.setName()
Set the name of the service.
methodsrc.twisted.application.service.IService.setServiceParent()
Set the parent of the service.
methodsrc.twisted.application.service.IService.startService()
Start the service.
methodsrc.twisted.application.service.IService.stopService()
Stop the service.
classsrc.twisted.application.service.IServiceCollection
Collection of services.
methodsrc.twisted.application.service.IServiceCollection.addService()
Add a child service.
methodsrc.twisted.application.service.IServiceCollection.removeService()
Remove a child service.
classsrc.twisted.application.service.MultiService
Straightforward Service Container.
classsrc.twisted.application.service.Process
Process running parameters.
classsrc.twisted.application.service.Service
Base class for services.
funcsrc.twisted.application.strports.listen(description:str, factory:interfaces.IProtocolFactory) -> interfaces.IListeningPort
Listen on a port corresponding to a description.
classsrc.twisted.application.twist._options.TwistOptions
Command line options for C{twist}.
methodsrc.twisted.application.twist._options.TwistOptions.installReactor(name:str) -> IReactorCore
Install the reactor.
methodsrc.twisted.application.twist._options.TwistOptions.opt_log_file(fileName:str) -> None
Log to file.
methodsrc.twisted.application.twist._options.TwistOptions.opt_log_format(format:str) -> None
Log file format.
methodsrc.twisted.application.twist._options.TwistOptions.opt_log_level(levelName:str) -> None
Set default log level.
methodsrc.twisted.application.twist._options.TwistOptions.opt_reactor(name:str) -> None
The name of the reactor to use.
methodsrc.twisted.application.twist._options.TwistOptions.opt_version() -> NoReturn
Print version and exit.
classsrc.twisted.application.twist._twist.Twist
Run a Twisted application.
methodsrc.twisted.application.twist._twist.Twist.main(argv:Sequence[str]=sys.argv) -> None
Executable entry point for L{Twist}.
methodsrc.twisted.application.twist._twist.Twist.options(argv:Sequence[str]) -> TwistOptions
Parse command line options.
methodsrc.twisted.application.twist._twist.Twist.run(twistOptions:TwistOptions) -> None
Run the application service.
methodsrc.twisted.application.twist._twist.Twist.service(plugin:IServiceMaker, options:Options) -> IService
Create the application service.
methodsrc.twisted.application.twist._twist.Twist.startService(reactor:IReactorCore, service:IService) -> None
Start the application service.
classsrc.twisted.conch.checkers.UserDB
A database of users by name, like the stdlib L{pwd} module.
methodsrc.twisted.conch.checkers.UserDB.getpwnam(username:str) -> UserRecord
Lookup a user record by name.
classsrc.twisted.conch.checkers.UserRecord
A record in a UNIX-style password database.
funcsrc.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.
funcsrc.twisted.conch.client.default.verifyHostKey(transport:SSHClientTransport, host:bytes, pubKey:bytes, fingerprint:str) -> Deferred[bool]
Verify a host's key.
classsrc.twisted.conch.error.HostKeyChanged
The host key of a remote host has changed.
classsrc.twisted.conch.error.UserRejectedKey
The user interactively rejected a key.
classsrc.twisted.conch.insults.helper.TerminalBuffer
An in-memory terminal emulator.
methodsrc.twisted.conch.insults.helper.TerminalBuffer.resetPrivateModes(modes)
Disable the given modes.
methodsrc.twisted.conch.insults.helper.TerminalBuffer.setPrivateModes(modes)
Enable the given modes.
methodsrc.twisted.conch.insults.helper.TerminalBuffer.write(data)
Add the given printable bytes to the terminal.
classsrc.twisted.conch.insults.insults.modes
ECMA 48 standardized modes
classsrc.twisted.conch.insults.insults.privateModes
ANSI-Compatible Private Modes
classsrc.twisted.conch.insults.window.YieldFocus
Input focus manipulation exception
classsrc.twisted.conch.interfaces.IConchUser
A user who has been authenticated to Cred through Conch.
classsrc.twisted.conch.interfaces.ISFTPFile
This represents an open file on the server.
methodsrc.twisted.conch.interfaces.ISFTPFile.close()
Close the file.
methodsrc.twisted.conch.interfaces.ISFTPFile.getAttrs()
Return the attributes for the file.
methodsrc.twisted.conch.interfaces.ISFTPFile.readChunk(length)
Read from the file.
methodsrc.twisted.conch.interfaces.ISFTPFile.setAttrs()
Set the attributes for the file.
methodsrc.twisted.conch.interfaces.ISFTPFile.writeChunk(data)
Write to the file.
classsrc.twisted.conch.interfaces.ISFTPServer
SFTP subsystem for server-side communication.
methodsrc.twisted.conch.interfaces.ISFTPServer.makeDirectory(attrs)
Make a directory.
methodsrc.twisted.conch.interfaces.ISFTPServer.makeLink(targetPath)
Create a symbolic link.
methodsrc.twisted.conch.interfaces.ISFTPServer.openDirectory()
Open a directory for scanning.
methodsrc.twisted.conch.interfaces.ISFTPServer.removeFile()
Remove the given file.
methodsrc.twisted.conch.interfaces.ISFTPServer.renameFile(newpath)
Rename the given file.
methodsrc.twisted.conch.interfaces.ISFTPServer.setAttrs(attrs)
Set the attributes for the path.
classsrc.twisted.conch.interfaces.ISessionSetEnv
A session that can set environment variables.
classsrc.twisted.conch.manhole.ColoredManhole
A REPL which syntax colors input as users type it.
classsrc.twisted.conch.manhole.FileWrapper
Minimal write-file-like object.
classsrc.twisted.conch.manhole.VT102Writer
Colorizer for Python tokens.
funcsrc.twisted.conch.manhole_tap.makeService(options)
Create a manhole server service.
classsrc.twisted.conch.mixin.BufferingMixin
Mixin which adds write buffering.
methodsrc.twisted.conch.mixin.BufferingMixin.flush()
Flush the buffer immediately.
classsrc.twisted.conch.recvline.Logging
Wrapper which logs attribute lookups.
classsrc.twisted.conch.recvline.RecvLine
L{TerminalProtocol} which adds line editing features.
funcsrc.twisted.conch.ssh._kex.getDHGeneratorAndPrime(kexAlgorithm:bytes) -> tuple[int, int]
Get the generator and the prime to use in key exchange.
funcsrc.twisted.conch.ssh._kex.getHashProcessor(kexAlgorithm:bytes) -> _HashFactory
Get the hash algorithm callable to use in key exchange.
funcsrc.twisted.conch.ssh._kex.getKex(kexAlgorithm:bytes) -> _IKexAlgorithm
Get a description of a named key exchange algorithm.
funcsrc.twisted.conch.ssh._kex.isEllipticCurve(kexAlgorithm:bytes) -> bool
Returns C{True} if C{kexAlgorithm} is an elliptic curve.
classsrc.twisted.conch.ssh.address.SSHTransportAddress
Object representing an SSH Transport endpoint.
classsrc.twisted.conch.ssh.agent.SSHAgentClient
The client side of the SSH agent protocol.
classsrc.twisted.conch.ssh.agent.SSHAgentServer
The server side of the SSH agent protocol.
methodsrc.twisted.conch.ssh.channel.SSHChannel.closed()
Called when the channel is closed.
methodsrc.twisted.conch.ssh.channel.SSHChannel.dataReceived(data)
Called when we receive data.
methodsrc.twisted.conch.ssh.channel.SSHChannel.write(data)
Write some data to the channel.
methodsrc.twisted.conch.ssh.channel.SSHChannel.writeSequence(data)
Part of the Transport interface.
funcsrc.twisted.conch.ssh.common.NS(t:bytes | str) -> bytes
net string
funcsrc.twisted.conch.ssh.common.getNS(s:bytes, count:int=1) -> Sequence[bytes]
get net string
classsrc.twisted.conch.ssh.connection.SSHConnection
An implementation of the 'ssh-connection' service.
methodsrc.twisted.conch.ssh.connection.SSHConnection.gotGlobalRequest(requestType, data)
We got a global request.
methodsrc.twisted.conch.ssh.connection.SSHConnection.sendClose(channel)
Close a channel.
methodsrc.twisted.conch.ssh.connection.SSHConnection.sendData(channel, data)
Send data to a channel.
methodsrc.twisted.conch.ssh.connection.SSHConnection.ssh_REQUEST_FAILURE(packet)
Our global request failed.
classsrc.twisted.conch.ssh.factory.SSHFactory
A Factory for SSH servers.
methodsrc.twisted.conch.ssh.factory.SSHFactory.startFactory() -> None
Check for public and private keys.
classsrc.twisted.conch.ssh.keys.BadKeyError
Raised when a key isn't what we expected from it.
classsrc.twisted.conch.ssh.keys.Key
An object representing a key.
methodsrc.twisted.conch.ssh.keys.Key.blob()
Return the public key blob for this key.
methodsrc.twisted.conch.ssh.keys.Key.data() -> dict[str, Any]
Return the values of the public key as a dictionary.
methodsrc.twisted.conch.ssh.keys.Key.fromFile(filename, type=None, passphrase=None)
Load a key from a file.
methodsrc.twisted.conch.ssh.keys.Key.isPublic()
Check if this instance is a public key.
methodsrc.twisted.conch.ssh.keys.Key.sign(data:bytes, signatureType:bytes | None=None) -> bytes
Sign some data with this key.
methodsrc.twisted.conch.ssh.keys.Key.size()
Return the size of the object we wrap.
methodsrc.twisted.conch.ssh.keys.Key.type() -> Literal['RSA', 'DSA', 'EC', 'Ed25519']
Return the type of the object we wrap.
methodsrc.twisted.conch.ssh.keys.Key.verify(signature, data)
Verify a signature using this key.
classsrc.twisted.conch.ssh.session.SSHSession
A generalized implementation of an SSH session.
classsrc.twisted.conch.ssh.session.SSHSessionProcessProtocol
I am both an L{IProcessProtocol} and an L{ITransport}.
methodsrc.twisted.conch.ssh.session.SSHSessionProcessProtocol.errConnectionLost()
See outConnectionLost().
methodsrc.twisted.conch.ssh.userauth.SSHUserAuthClient.askForAuth(kind:bytes, extraData:bytes) -> None
Send a C{MSG_USERAUTH_REQUEST}.
methodsrc.twisted.conch.ssh.userauth.SSHUserAuthClient.auth_password() -> bool
Try to authenticate with a password.
methodsrc.twisted.conch.ssh.userauth.SSHUserAuthClient.auth_publickey() -> Deferred[bool]
Try to authenticate with a public key.
methodsrc.twisted.conch.ssh.userauth.SSHUserAuthClient.getPublicKey() -> Key | None
Return a public key for the user.
methodsrc.twisted.conch.ssh.userauth.SSHUserAuthClient.signData(publicKey:keys.Key, signData:bytes) -> Deferred[bytes] | None
Sign the given data with the given public key.
methodsrc.twisted.conch.ssh.userauth.SSHUserAuthClient.ssh_USERAUTH_PK_OK_publickey(packet)
This is MSG_USERAUTH_PK.
methodsrc.twisted.conch.ssh.userauth.SSHUserAuthClient.tryAuth(kind:bytes) -> None | Deferred[bool]
Dispatch to an authentication method.
methodsrc.twisted.conch.tap.Options.addChecker(checker)
Add the checker specified.
classsrc.twisted.conch.telnet.Telnet
@ivar commandMap: A mapping of bytes to callables.
classsrc.twisted.conch.ui.ansi.AnsiParser
Parser class for ANSI codes.
methodsrc.twisted.conch.ui.ansi.AnsiParser.parseColor(str)
Handle a single ANSI color sequence
funcsrc.twisted.cred._digest.calcHA2(algo, pszMethod, pszDigestUri, pszQop, pszHEntity)
Compute H(A2) from RFC 2617.
classsrc.twisted.cred.checkers.FilePasswordDB
A file-based, text-based username/password database.
methodsrc.twisted.cred.checkers.FilePasswordDB.getUser(username:bytes) -> tuple[bytes, bytes]
Look up the credentials for a username.
classsrc.twisted.cred.checkers.InMemoryUsernamePasswordDatabaseDontUse
An extremely simple credentials checker.
methodsrc.twisted.cred.checkers.InMemoryUsernamePasswordDatabaseDontUse.addUser(username:bytes, password:bytes) -> None
Set a user's password.
classsrc.twisted.cred.credentials.CramMD5Credentials
An encapsulation of some CramMD5 hashed credentials.
classsrc.twisted.cred.credentials.DigestedCredentials
Yet Another Simple HTTP Digest authentication scheme.
classsrc.twisted.cred.credentials.IAnonymous
I am an explicitly anonymous request for access.
classsrc.twisted.cred.credentials.ICredentials
I check credentials.
classsrc.twisted.cred.credentials.IUsernameHashedPassword
I encapsulate a username and a hashed password.
classsrc.twisted.cred.credentials.IUsernamePassword
I encapsulate a username and a plaintext password.
classsrc.twisted.cred.error.LoginDenied
The realm rejected this login for some reason.
classsrc.twisted.cred.error.LoginFailed
The user's request to log in failed for some reason.
classsrc.twisted.cred.error.Unauthorized
Standard unauthorized error.
classsrc.twisted.cred.error.UnauthorizedLogin
The user was not authorized to log in.
classsrc.twisted.cred.portal.Portal
A mediator between clients and a realm.
classsrc.twisted.cred.strcred.StrcredException
Base exception class for strcred.
classsrc.twisted.enterprise.adbapi.Connection
A wrapper for a DB-API connection instance.
classsrc.twisted.enterprise.adbapi.ConnectionLost
This exception means that a db connection has been lost.
methodsrc.twisted.enterprise.adbapi.ConnectionPool.start()
Start the connection pool.
classsrc.twisted.enterprise.adbapi.Transaction
A lightweight wrapper for a DB-API 'cursor' object.
funcsrc.twisted.internet._deprecate.deprecatedGnomeReactor(name:str, version:Version) -> None
Emit a deprecation warning about a gnome-related reactor.
classsrc.twisted.internet._dumbwin32proc.Process
A process that integrates with the Twisted event loop.
methodsrc.twisted.internet._dumbwin32proc.Process.closeStdin()
Close the process' stdin.
methodsrc.twisted.internet._dumbwin32proc.Process.write(data)
Write data to the process' stdin.
methodsrc.twisted.internet._dumbwin32proc.Process.writeSequence(seq)
Write data to the process' stdin.
classsrc.twisted.internet._glibbase.GlibReactorBase
Base class for GObject event loop reactors.
methodsrc.twisted.internet._glibbase.GlibReactorBase.callLater(*args, **kwargs)
Schedule a C{DelayedCall}.
methodsrc.twisted.internet._glibbase.GlibReactorBase.crash()
Crash the reactor.
methodsrc.twisted.internet._glibbase.GlibReactorBase.run(installSignalHandlers=True)
Run the reactor.
methodsrc.twisted.internet._glibbase.GlibReactorBase.stop()
Stop the reactor.
classsrc.twisted.internet._glibbase.GlibWaker
Run scheduled events after waking up.
classsrc.twisted.internet._multicast.MulticastMixin
Implement multicast functionality.
methodsrc.twisted.internet._multicast.MulticastMixin.joinGroup(addr:str, interface:str='') -> Deferred[None]
@see: L{IMulticastTransport.joinGroup}
methodsrc.twisted.internet._multicast.MulticastMixin.leaveGroup(addr:str, interface:str='') -> Deferred[None]
@see: L{IMulticastTransport.leaveGroup}
methodsrc.twisted.internet._multicast.MulticastMixin.setOutgoingInterface(addr:str | int) -> Deferred[int]
@see: L{IMulticastTransport.setOutgoingInterface}
funcsrc.twisted.internet._newtls.startTLS(transport, contextFactory, normal, bypass)
Add a layer of SSL to a transport.
classsrc.twisted.internet._posixserialport.SerialPort
A select()able serial device, acting as a transport.
classsrc.twisted.internet._resolver.HostResolution
The in-progress resolution of a given hostname.
classsrc.twisted.internet._sslverify.Certificate
An x509 certificate.
methodsrc.twisted.internet._sslverify.Certificate.load(requestData:bytes, format:int=crypto.FILETYPE_ASN1, args:tuple[Any, ...]=()) -> _Self
Load a certificate from an ASN.1- or PEM-format string.
methodsrc.twisted.internet._sslverify.Certificate.loadPEM(data:bytes) -> Certificate
Load a certificate from a PEM-format data string.
classsrc.twisted.internet._sslverify.CertificateRequest
An x509 certificate request.
classsrc.twisted.internet._sslverify.ClientTLSOptions
Client creator for TLS.
methodsrc.twisted.internet._sslverify.ClientTLSOptions.clientConnectionForTLS(tlsProtocol:TLSMemoryBIOProtocol) -> Connection
Create a TLS connection for a client.
classsrc.twisted.internet._sslverify.DistinguishedName
Identify and describe an entity.
classsrc.twisted.internet._sslverify.IOpenSSLTrustRoot
Trust settings for an OpenSSL context.
classsrc.twisted.internet._sslverify.OpenSSLCipher
A representation of an OpenSSL cipher.
classsrc.twisted.internet._sslverify.PrivateCertificate
An x509 certificate and private key.
classsrc.twisted.internet._sslverify.TLSVersion
TLS versions that we can negotiate with the client/server.
classsrc.twisted.internet.abstract.FileDescriptor
An object which can be operated on by select().
methodsrc.twisted.internet.abstract.FileDescriptor.connectionLost(reason)
The connection was lost.
methodsrc.twisted.internet.abstract.FileDescriptor.doWrite()
Called when data can be written.
methodsrc.twisted.internet.abstract.FileDescriptor.stopConsuming()
Stop consuming data.
methodsrc.twisted.internet.abstract.FileDescriptor.stopWriting()
Stop waiting for write availability.
methodsrc.twisted.internet.abstract.FileDescriptor.write(data:bytes) -> None
Reliably write some data.
methodsrc.twisted.internet.abstract.FileDescriptor.writeSequence(iovec:Iterable[bytes]) -> None
Reliably write a sequence of data.
methodsrc.twisted.internet.abstract.FileDescriptor.writeSomeData(data:bytes) -> int | BaseException
Write as much as possible of the given data, immediately.
funcsrc.twisted.internet.abstract.isIPv6Address(addr:str) -> bool
Determine whether the given string represents an IPv6 address.
classsrc.twisted.internet.address.UNIXAddress
Object representing a UNIX socket endpoint.
funcsrc.twisted.internet.asyncioreactor.install(eventloop=None)
Install an asyncio-based reactor.
classsrc.twisted.internet.base.BaseConnector
Basic implementation of L{IConnector}.
methodsrc.twisted.internet.base.BaseConnector.connect() -> None
Start connection to remote server.
methodsrc.twisted.internet.base.BaseConnector.disconnect() -> None
Disconnect whatever our state is.
methodsrc.twisted.internet.base.BaseConnector.stopConnecting() -> None
Stop attempting to connect.
classsrc.twisted.internet.base.BasePort
Basic implementation of a ListeningPort.
methodsrc.twisted.internet.base.BasePort.doWrite() -> Failure | None
Raises a RuntimeError
classsrc.twisted.internet.base.ReactorBase
Default base class for Reactors.
methodsrc.twisted.internet.base.ReactorBase.crash() -> None
See twisted.internet.interfaces.IReactorCore.crash.
methodsrc.twisted.internet.base.ReactorBase.disconnectAll() -> None
Disconnect every reader, and writer in the system.
methodsrc.twisted.internet.base.ReactorBase.fireSystemEvent(eventType:str) -> None
See twisted.internet.interfaces.IReactorCore.fireSystemEvent.
methodsrc.twisted.internet.base.ReactorBase.iterate(delay:float=0.0) -> None
See twisted.internet.interfaces.IReactorCore.iterate.
methodsrc.twisted.internet.base.ReactorBase.resolve(name:str, timeout:Sequence[int]=(1, 3, 11, 45)) -> Deferred[str]
Return a Deferred that will resolve a hostname.
methodsrc.twisted.internet.base.ReactorBase.runUntilCurrent() -> None
Run all pending timed calls.
methodsrc.twisted.internet.base.ReactorBase.sigBreak(number:int, frame:FrameType | None=None) -> None
Handle a SIGBREAK interrupt.
methodsrc.twisted.internet.base.ReactorBase.sigInt(number:int, frame:FrameType | None=None) -> None
Handle a SIGINT interrupt.
methodsrc.twisted.internet.base.ReactorBase.sigTerm(number:int, frame:FrameType | None=None) -> None
Handle a SIGTERM interrupt.
methodsrc.twisted.internet.base.ReactorBase.stop() -> None
See twisted.internet.interfaces.IReactorCore.stop.
methodsrc.twisted.internet.base.ReactorBase.wakeUp() -> None
Wake up the event loop.
classsrc.twisted.internet.cfreactor.CFReactor
The CoreFoundation reactor.
methodsrc.twisted.internet.cfreactor.CFReactor.crash()
Implement L{IReactorCore.crash}
methodsrc.twisted.internet.cfreactor.CFReactor.stop() -> None
Implement L{IReactorCore.stop}.
classsrc.twisted.internet.defer.CancelledError
This error is raised by default when a L{Deferred} is cancelled.
classsrc.twisted.internet.defer.DebugInfo
Deferred debug helper.
classsrc.twisted.internet.defer.Deferred
This is a callback which will be put off until later.
methodsrc.twisted.internet.defer.Deferred.callback(result:_SelfResultT | Failure) -> None
Run all success callbacks that have been added to this L{Deferred}.
methodsrc.twisted.internet.defer.Deferred.cancel() -> None
Cancel this L{Deferred}.
methodsrc.twisted.internet.defer.Deferred.chainDeferred(d:Deferred[_SelfResultT]) -> Deferred[None]
Chain another L{Deferred} to this L{Deferred}.
methodsrc.twisted.internet.defer.Deferred.errback(fail:Failure | BaseException | None=None) -> None
Run all error callbacks that have been added to this L{Deferred}.
methodsrc.twisted.internet.defer.Deferred.fromFuture(future:Future[_SelfResultT]) -> Deferred[_SelfResultT]
Adapt a L{Future} to a L{Deferred}.
methodsrc.twisted.internet.defer.Deferred.pause() -> None
Stop processing on a L{Deferred} until L{unpause}() is called.
methodsrc.twisted.internet.defer.Deferred.unpause() -> None
Process all callbacks made since L{pause}() was called.
classsrc.twisted.internet.defer.DeferredList
L{DeferredList} is a tool for collecting the results of several Deferreds.
methodsrc.twisted.internet.defer.DeferredList.cancel() -> None
Cancel this L{DeferredList}.
classsrc.twisted.internet.defer.DeferredLock
A lock for event driven systems.
methodsrc.twisted.internet.defer.DeferredLock.acquire() -> Deferred[Self]
Attempt to acquire the lock.
methodsrc.twisted.internet.defer.DeferredLock.release() -> None
Release the lock.
classsrc.twisted.internet.defer.DeferredQueue
An event driven queue.
methodsrc.twisted.internet.defer.DeferredQueue.get() -> Deferred[_T]
Attempt to retrieve and remove an object from the queue.
methodsrc.twisted.internet.defer.DeferredQueue.put(obj:_T) -> None
Add an object to this queue.
classsrc.twisted.internet.defer.DeferredSemaphore
A semaphore for event driven systems.
methodsrc.twisted.internet.defer.DeferredSemaphore.acquire() -> Deferred[Self]
Attempt to acquire the token.
methodsrc.twisted.internet.defer.DeferredSemaphore.release() -> None
Release the token.
classsrc.twisted.internet.defer.FailureGroup
More than one failure occurred.
classsrc.twisted.internet.defer.TimeoutError
This error is raised by default when a L{Deferred} times out.
funcsrc.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.
funcsrc.twisted.internet.defer.fail(result:Failure | BaseException | None=None) -> Deferred[Any]
Return a L{Deferred} that has already had C{.errback(result)} called.
funcsrc.twisted.internet.defer.getDebugging() -> bool
Determine whether L{Deferred} debugging is enabled.
funcsrc.twisted.internet.defer.logError(err:Failure) -> Failure
Log and return failure.
funcsrc.twisted.internet.defer.returnValue(val:object) -> NoReturn
Return val from a L{inlineCallbacks} generator.
funcsrc.twisted.internet.defer.setDebugging(on:bool) -> None
Enable or disable L{Deferred} debugging.
funcsrc.twisted.internet.defer.succeed(result:_T) -> Deferred[_T]
Return a L{Deferred} that has already had C{.callback(result)} called.
classsrc.twisted.internet.endpoints.TCP4ClientEndpoint
TCP client endpoint with an IPv4 configuration.
classsrc.twisted.internet.endpoints.TCP6ClientEndpoint
TCP client endpoint with an IPv6 configuration.
classsrc.twisted.internet.endpoints.UNIXClientEndpoint
UnixSocket client endpoint.
classsrc.twisted.internet.endpoints.UNIXServerEndpoint
UnixSocket server endpoint.
classsrc.twisted.internet.epollreactor.EPollReactor
A reactor that uses epoll(7).
methodsrc.twisted.internet.epollreactor.EPollReactor.doPoll(timeout)
Poll the poller for new events.
funcsrc.twisted.internet.epollreactor.install()
Install the epoll() reactor.
classsrc.twisted.internet.error.ConnectInProgressError
A connect operation was started and isn't done yet.
classsrc.twisted.internet.error.ConnectionClosed
Connection was closed, whether cleanly or non-cleanly.
classsrc.twisted.internet.error.InvalidAddressError
An invalid address was specified (i.e.
classsrc.twisted.internet.error.MulticastJoinError
An attempt to join a multicast group failed.
classsrc.twisted.internet.error.ReactorAlreadyInstalledError
Could not install reactor because one is already installed.
funcsrc.twisted.internet.fdesc.writeToFD(fd, data)
Write data to file descriptor.
classsrc.twisted.internet.gireactor.GIReactor
GObject-introspection event loop reactor.
classsrc.twisted.internet.gireactor.PortableGIReactor
Portable GObject Introspection event loop reactor.
methodsrc.twisted.internet.gireactor.PortableGIReactor.simulate() -> None
For compatibility only.
classsrc.twisted.internet.glib2reactor.Glib2Reactor
The reactor using the glib mainloop.
classsrc.twisted.internet.gtk2reactor.Gtk2Reactor
PyGTK+ 2 event loop reactor.
classsrc.twisted.internet.interfaces.IAcceptableCiphers
A list of acceptable ciphers for a TLS context.
classsrc.twisted.internet.interfaces.IAddress
An address, e.g.
classsrc.twisted.internet.interfaces.ICipher
A TLS cipher.
methodsrc.twisted.internet.interfaces.IConnector.connect() -> None
Try to connect to remote address.
methodsrc.twisted.internet.interfaces.IConnector.disconnect() -> None
Disconnect regardless of the connection state.
methodsrc.twisted.internet.interfaces.IConnector.getDestination() -> IAddress
Return destination this will try to connect to.
methodsrc.twisted.internet.interfaces.IConnector.stopConnecting() -> None
Stop attempting to connect.
classsrc.twisted.internet.interfaces.IConsumer
A consumer consumes data from a producer.
methodsrc.twisted.internet.interfaces.IConsumer.registerProducer(streaming:bool) -> None
Register to receive data from a producer.
methodsrc.twisted.internet.interfaces.IConsumer.write() -> None
The producer will write data by calling this method.
classsrc.twisted.internet.interfaces.IDelayedCall
A scheduled call.
methodsrc.twisted.internet.interfaces.IDelayedCall.cancel() -> None
Cancel the scheduled call.
methodsrc.twisted.internet.interfaces.IDelayedCall.delay() -> None
Delay the scheduled call.
methodsrc.twisted.internet.interfaces.IDelayedCall.getTime() -> float
Get time when delayed call will happen.
methodsrc.twisted.internet.interfaces.IDelayedCall.reset() -> None
Reset the scheduled call's timer.
methodsrc.twisted.internet.interfaces.IFileDescriptor.connectionLost() -> None
Called when the connection was lost.
classsrc.twisted.internet.interfaces.IHalfCloseableDescriptor
A descriptor that can be half-closed.
methodsrc.twisted.internet.interfaces.IHalfCloseableDescriptor.readConnectionLost() -> None
Indicates read connection was lost.
methodsrc.twisted.internet.interfaces.IHalfCloseableDescriptor.writeConnectionLost() -> None
Indicates write connection was lost.
classsrc.twisted.internet.interfaces.IListeningPort
A listening port.
methodsrc.twisted.internet.interfaces.IListeningPort.getHost() -> IAddress
Get the host that this port is listening for.
methodsrc.twisted.internet.interfaces.IListeningPort.startListening() -> None
Start listening on this port.
methodsrc.twisted.internet.interfaces.IListeningPort.stopListening() -> Deferred[None] | None
Stop listening on this port.
classsrc.twisted.internet.interfaces.IMulticastTransport
Additional functionality for multicast UDP.
methodsrc.twisted.internet.interfaces.IMulticastTransport.getLoopbackMode() -> bool
Return if loopback mode is enabled.
methodsrc.twisted.internet.interfaces.IMulticastTransport.getTTL() -> int
Get time to live for multicast packets.
methodsrc.twisted.internet.interfaces.IMulticastTransport.joinGroup(interface:str='') -> Deferred[None]
Join a multicast group.
methodsrc.twisted.internet.interfaces.IMulticastTransport.leaveGroup(interface:str='') -> Deferred[None]
Leave multicast group, return L{Deferred} of success.
methodsrc.twisted.internet.interfaces.IMulticastTransport.setLoopbackMode() -> None
Set if loopback mode is enabled.
methodsrc.twisted.internet.interfaces.IMulticastTransport.setTTL() -> None
Set time to live on multicast packets.
classsrc.twisted.internet.interfaces.IProcessProtocol
Interface for process-related event handlers.
methodsrc.twisted.internet.interfaces.IProcessProtocol.childDataReceived(data:bytes) -> None
Called when data arrives from the child process.
methodsrc.twisted.internet.interfaces.IProcessProtocol.makeConnection() -> None
Called when the process has been created.
methodsrc.twisted.internet.interfaces.IProcessProtocol.processExited() -> None
Called when the child process exits.
classsrc.twisted.internet.interfaces.IProcessTransport
A process transport.
methodsrc.twisted.internet.interfaces.IProcessTransport.closeStderr() -> None
Close stderr.
methodsrc.twisted.internet.interfaces.IProcessTransport.closeStdin() -> None
Close stdin after all data has been written out.
methodsrc.twisted.internet.interfaces.IProcessTransport.closeStdout() -> None
Close stdout.
methodsrc.twisted.internet.interfaces.IProcessTransport.loseConnection() -> None
Close stdin, stderr and stdout.
methodsrc.twisted.internet.interfaces.IProcessTransport.signalProcess() -> None
Send a signal to the process.
classsrc.twisted.internet.interfaces.IProducer
A producer produces data for a consumer.
methodsrc.twisted.internet.interfaces.IProducer.stopProducing() -> None
Stop producing data.
classsrc.twisted.internet.interfaces.IProtocolFactory
Interface for protocol factories.
classsrc.twisted.internet.interfaces.IReactorCore
Core methods that a Reactor must implement.
methodsrc.twisted.internet.interfaces.IReactorCore.callWhenRunning(*args:object, **kwargs:object) -> Any | None
Call a function when the reactor is running.
methodsrc.twisted.internet.interfaces.IReactorCore.fireSystemEvent() -> None
Fire a system-wide event.
classsrc.twisted.internet.interfaces.IReactorMulticast
UDP socket methods that support multicast.
classsrc.twisted.internet.interfaces.IReactorThreads
Dispatch methods to be run in threads.
classsrc.twisted.internet.interfaces.IReactorTime
Time methods that a Reactor should implement.
methodsrc.twisted.internet.interfaces.IReactorTime.callLater(callable:Callable[..., Any], *args:object, **kwargs:object) -> IDelayedCall
Call a function later.
methodsrc.twisted.internet.interfaces.IReactorTime.seconds() -> float
Get the current time in seconds.
classsrc.twisted.internet.interfaces.IReactorUDP
UDP socket methods.
classsrc.twisted.internet.interfaces.IReactorUNIX
UNIX socket methods.
methodsrc.twisted.internet.interfaces.IReactorUNIX.connectUNIX(factory:ClientFactory, timeout:float=30, checkPID:bool=False) -> IConnector
Connect a client protocol to a UNIX socket.
methodsrc.twisted.internet.interfaces.IReactorUNIX.listenUNIX(factory:Factory, backlog:int=50, mode:int=438, wantPID:bool=False) -> IListeningPort
Listen on a UNIX socket.
classsrc.twisted.internet.interfaces.IReactorUNIXDatagram
Datagram UNIX socket methods.
methodsrc.twisted.internet.interfaces.IReactorUNIXDatagram.listenUNIXDatagram(protocol:DatagramProtocol, maxPacketSize:int, mode:int) -> IListeningPort
Listen on a datagram UNIX socket.
classsrc.twisted.internet.interfaces.IReactorWin32Events
Win32 Event API methods @since: 10.2
methodsrc.twisted.internet.interfaces.IReactorWin32Events.addEvent(fd:FileDescriptor, action:str) -> None
Add a new win32 event to the event loop.
methodsrc.twisted.internet.interfaces.IReactorWin32Events.removeEvent() -> None
Remove an event.
classsrc.twisted.internet.interfaces.IReadDescriptor
An L{IFileDescriptor} that can read.
classsrc.twisted.internet.interfaces.IReadWriteDescriptor
An L{IFileDescriptor} that can both read and write.
classsrc.twisted.internet.interfaces.ISSLTransport
A SSL/TLS based transport.
methodsrc.twisted.internet.interfaces.IServiceCollection.addService() -> None
Add a service to this collection.
methodsrc.twisted.internet.interfaces.IServiceCollection.removeService() -> None
Remove a service from this collection.
classsrc.twisted.internet.interfaces.ISystemHandle
An object that wraps a networking OS-specific handle.
methodsrc.twisted.internet.interfaces.ISystemHandle.getHandle() -> object
Return a system- and reactor-specific handle.
classsrc.twisted.internet.interfaces.ITCPTransport
A TCP based transport.
methodsrc.twisted.internet.interfaces.ITCPTransport.abortConnection() -> None
Close the connection abruptly.
methodsrc.twisted.internet.interfaces.ITCPTransport.getHost() -> IPv4Address | IPv6Address
Returns L{IPv4Address} or L{IPv6Address}.
methodsrc.twisted.internet.interfaces.ITCPTransport.getPeer() -> IPv4Address | IPv6Address
Returns L{IPv4Address} or L{IPv6Address}.
methodsrc.twisted.internet.interfaces.ITCPTransport.getTcpKeepAlive() -> bool
Return if C{SO_KEEPALIVE} is enabled.
methodsrc.twisted.internet.interfaces.ITCPTransport.getTcpNoDelay() -> bool
Return if C{TCP_NODELAY} is enabled.
methodsrc.twisted.internet.interfaces.ITCPTransport.loseWriteConnection() -> None
Half-close the write side of a TCP connection.
methodsrc.twisted.internet.interfaces.ITCPTransport.setTcpKeepAlive() -> None
Enable/disable C{SO_KEEPALIVE}.
methodsrc.twisted.internet.interfaces.ITCPTransport.setTcpNoDelay() -> None
Enable/disable C{TCP_NODELAY}.
classsrc.twisted.internet.interfaces.ITLSTransport
A TCP transport that supports switching to TLS midstream.
methodsrc.twisted.internet.interfaces.ITLSTransport.startTLS() -> None
Initiate TLS negotiation.
classsrc.twisted.internet.interfaces.ITransport
I am a transport for bytes.
methodsrc.twisted.internet.interfaces.ITransport.getPeer() -> IAddress
Get the remote address of this connection.
methodsrc.twisted.internet.interfaces.ITransport.loseConnection() -> None
Close my connection, after writing all pending data.
classsrc.twisted.internet.interfaces.IUDPTransport
Transport for UDP DatagramProtocols.
methodsrc.twisted.internet.interfaces.IUDPTransport.connect(port:int) -> None
Connect the transport to an address.
methodsrc.twisted.internet.interfaces.IUDPTransport.getHost() -> IPv4Address | IPv6Address
Get this port's host address.
methodsrc.twisted.internet.interfaces.IUDPTransport.setBroadcastAllowed() -> None
Set whether this port may broadcast.
methodsrc.twisted.internet.interfaces.IUDPTransport.stopListening() -> Deferred[None] | None
Stop listening on this port.
methodsrc.twisted.internet.interfaces.IUDPTransport.write(addr:tuple[str, int] | None) -> None
Write packet to given address.
classsrc.twisted.internet.interfaces.IUNIXDatagramConnectedTransport
Transport for UDP ConnectedPacketProtocols.
methodsrc.twisted.internet.interfaces.IUNIXDatagramConnectedTransport.getHost() -> UNIXAddress
Returns L{UNIXAddress}.
methodsrc.twisted.internet.interfaces.IUNIXDatagramConnectedTransport.getPeer() -> UNIXAddress
Returns L{UNIXAddress}.
methodsrc.twisted.internet.interfaces.IUNIXDatagramConnectedTransport.write() -> None
Write packet to address we are connected to.
classsrc.twisted.internet.interfaces.IUNIXDatagramTransport
Transport for UDP PacketProtocols.
methodsrc.twisted.internet.interfaces.IUNIXDatagramTransport.getHost() -> UNIXAddress
Returns L{UNIXAddress}.
methodsrc.twisted.internet.interfaces.IUNIXDatagramTransport.write(addr:str) -> None
Write packet to given address.
classsrc.twisted.internet.interfaces.IUNIXTransport
Transport for stream-oriented unix domain connections.
classsrc.twisted.internet.interfaces.IWriteDescriptor
An L{IFileDescriptor} that can write.
methodsrc.twisted.internet.interfaces.IWriteDescriptor.doWrite() -> Failure | None
Some data can be written to your descriptor.
classsrc.twisted.internet.iocpreactor.abstract.FileHandle
File handle that can read and write asynchronously
methodsrc.twisted.internet.iocpreactor.abstract.FileHandle.connectionLost(reason)
The connection was lost.
methodsrc.twisted.internet.iocpreactor.abstract.FileHandle.stopConsuming()
Stop consuming data.
methodsrc.twisted.internet.iocpreactor.abstract.FileHandle.write(data)
Reliably write some data.
methodsrc.twisted.internet.iocpreactor.tcp.Connection.registerProducer(producer, streaming)
Register a producer.
methodsrc.twisted.internet.iocpreactor.tcp.Connection.unregisterProducer()
Unregister a producer.
methodsrc.twisted.internet.iocpreactor.tcp.Port.connectionLost(reason)
Cleans up the socket.
classsrc.twisted.internet.iocpreactor.tcp.Server
Serverside socket-stream connection class.
methodsrc.twisted.internet.iocpreactor.tcp.Server.getHost()
Returns an IPv4Address.
methodsrc.twisted.internet.iocpreactor.tcp.Server.getPeer()
Returns an IPv4Address.
classsrc.twisted.internet.iocpreactor.udp.MulticastPort
UDP Port that supports multicasting.
classsrc.twisted.internet.iocpreactor.udp.Port
UDP port, listening for packets.
methodsrc.twisted.internet.iocpreactor.udp.Port.connect(host, port)
'Connect' to remote server.
methodsrc.twisted.internet.iocpreactor.udp.Port.connectionLost(reason=None)
Cleans up my socket.
methodsrc.twisted.internet.iocpreactor.udp.Port.getHandle()
Return a socket object.
methodsrc.twisted.internet.iocpreactor.udp.Port.write(datagram, addr=None)
Write a datagram.
funcsrc.twisted.internet.kqreactor.install()
Install the kqueue() reactor.
funcsrc.twisted.internet.main.installReactor(reactor)
Install reactor C{reactor}.
classsrc.twisted.internet.pollreactor.PollReactor
A reactor that uses poll(2).
methodsrc.twisted.internet.pollreactor.PollReactor.doPoll(timeout)
Poll the poller for new events.
funcsrc.twisted.internet.pollreactor.install()
Install the poll() reactor.
classsrc.twisted.internet.posixbase.PosixReactorBase
A basis for reactors that use file descriptors.
classsrc.twisted.internet.process.PTYProcess
An operating-system Process that uses PTY support.
classsrc.twisted.internet.process.Process
An operating-system Process.
funcsrc.twisted.internet.process.reapAllProcesses() -> None
Reap all registered processes.
classsrc.twisted.internet.protocol.AbstractDatagramProtocol
Abstract protocol for datagram-oriented transports, e.g.
methodsrc.twisted.internet.protocol.AbstractDatagramProtocol.datagramReceived(datagram:bytes, addr:tuple[str, int]) -> None
Called when a datagram is received.
methodsrc.twisted.internet.protocol.AbstractDatagramProtocol.makeConnection(transport:IUDPTransport) -> None
Make a connection to a transport and a server.
classsrc.twisted.internet.protocol.BaseProtocol
This is the abstract superclass of all protocols.
classsrc.twisted.internet.protocol.ClientCreator
Client 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.

Back to all 805 libraries