Pyro - Python Remote Objects (original) (raw)
What is Pyro?¶
It is a library that enables you to build applications in which objects can talk to each other over the network, with minimal programming effort. You can just use normal Python method calls to call objects on other machines. Pyro is a pure Python library and runs on many different platforms and Python versions.
Pyro is copyright © Irmen de Jong (irmen@razorvine.net | http://www.razorvine.net). Please read Software License and Disclaimer.
It’s on Pypi as Pyro4. Source on Github: https://github.com/irmen/Pyro4and version 5 as Pyro5 (Source)
Pyro4 is considered feature complete and new development is frozen. Only very important bug fixes (such as security issues) will still be made to Pyro4. New development, improvements and new features will only be available in its successorPyro5 . New code should use Pyro5 unless a feature of Pyro4 is strictly required. Older code should consider migrating to Pyro5. It provides a (simple) backwards compatibility api layer to make the porting easier.
Contents of this manual:
- Intro and Example
- Installing Pyro
- Tutorial
- Command line tools
- Clients: Calling remote objects
- Servers: hosting Pyro objects
- Name Server
- Starting the Name Server
- Starting the Name Server from within your own code
- Configuration items
- Name server control tool
- Locating the Name Server and using it in your code
- The PYRONAME protocol type
- The PYROMETA protocol type
- Resolving object names
- Registering object names
- Free connections to the NS quickly
- Using the name server with pickle, cloudpickle or dill serializers
- Yellow-pages ability of the Name Server (metadata tags)
- Other methods in the Name Server API
- Security
- Exceptions and remote tracebacks
- Flame: Foreign Location Automatic Module Exposer
- Tips & Tricks
- Best practices
- Logging
- Multiple network interfaces
- Same major Python version required when using pickle, cloudpickle, dill or marshal
- Wire protocol version
- Asynchronous (‘future’) normal function calls
- DNS setup
- Pyro behind a NAT router/firewall
- ‘Failed to locate the nameserver’ or ‘Connection refused’ error, what now?
- Binary data transfer / file transfer
- MSG_WAITALL socket option
- IPV6 support
- Pyro and Numpy
- Pyro via HTTP and JSON
- Client information on the current_context, correlation id
- Automatically freeing resources when client connection gets closed
- Message annotations
- Connection handshake
- Efficient dispatchers or gateways that don’t de/reserialize messages
- Hooking onto existing connected sockets such as from socketpair()
- Configuring Pyro
- Pyro4 library API
- Pyro4 — Main API package
- Pyro4.core — core Pyro logic
- Pyro4.naming — Pyro name server
- Pyro4.util — Utilities and serializers
- Pyro4.socketutil — Socket related utilities
- Pyro4.message — Pyro wire protocol message
- Pyro4.constants — Constant value definitions
- Pyro4.config — Configuration items
- Pyro4.errors — Exception classes
- Pyro4.test.echoserver — Built-in echo server for testing purposes
- Pyro4.utils.flame — Foreign Location Automatic Module Exposer
- Pyro4.futures — asynchronous calls
- Socket server API contract
- Running on alternative Python implementations
- Pyrolite - client library for Java and .NET
- Change Log
- Software License and Disclaimer