Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(5)  |  Derive(1)  |  Import(4)
models a capability 
A capability is a web resource which enables functionality for a client
The seed capability is a special type, through which other capabilities 
are procured

A capability in pyogp provides a GET and a POST method

Sample implementations: region.py
Tests: tests/caps.txt, tests/test_caps.py

src/p/y/pyogp.lib.client-0.1/pyogp/lib/client/region.py   pyogp.lib.client(Download)
# pyogp
from pyogp.lib.base.caps import Capability
from pyogp.lib.base.network.stdlib_client import StdLibClient, HTTPError
from pyogp.lib.client.exc import ResourceNotFound, ResourceError, RegionSeedCapNotAvailable, \
class RegionSeedCapability(Capability):
    """ a seed capability which is able to retrieve other capabilities """
    def get(self, names=[], settings = None):
        """if this is a seed cap we can retrieve other caps here"""
            # TODO: some caps might be seed caps, how do we know? 
            if parsed_result.has_key(name):
                caps[name] = Capability(name, parsed_result[name], settings = self.settings)
                if self.settings.ENABLE_CAPS_LOGGING:

src/p/y/pyogp.lib.client-0.1/pyogp/lib/client/assets.py   pyogp.lib.client(Download)
from pyogp.lib.client.objects import Object
from pyogp.lib.base.datatypes import Vector3, UUID
from pyogp.lib.base.caps import Capability
from pyogp.lib.client.enums import AssetType
    def upload_via_caps_responder(self, url, payload):
        Creates a Capability instance for the given url and POSTS the payload.
        cap = Capability("uploader", url)

src/p/y/pyogp.lib.client-0.1/pyogp/lib/client/tests/test_event_queue.py   pyogp.lib.client(Download)
from pyogp.lib.base.event_queue import EventQueueClient
from pyogp.lib.base.exc import *
from pyogp.lib.base.caps import Capability
from pyogp.lib.base.message.circuit import Host
    def test_processRegionEventQueue_exception(self):
        self.eq.cap = Capability('foo', '')
        self.assertRaises(RegionCapNotAvailable, self.eq._processRegionEventQueue) 
    def test_start_and_stop(self):
        self.eq.cap = Capability('EventQueueGet', '')

src/p/y/pyogp.lib.base-0.1/pyogp/lib/base/tests/test_message_manager.py   pyogp.lib.base(Download)
# pyogp
from pyogp.lib.base.message_manager import MessageManager
from pyogp.lib.base.caps import Capability
from pyogp.lib.base.message.message import Message, Block
from pyogp.lib.base.tests.mockup_net import MockupUDPServer, MockupUDPClient
    def setUp(self):
        self.host = Host((MockupUDPServer(), 80))
        self.message_manager = MessageManager(self.host,
                                              capabilities={'EventQueueGet' : Capability('EventQueueGet', '')})