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

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

src/p/y/pyninja-HEAD/pyninja/NinjaAPI.py   pyninja(Download)
import requests
import os
from .NinjaException import NinjaException
from .NinjaUser import NinjaUser
		if response.status_code != 200:
			raise NinjaException( 'API returned HTTP response code %d' % response.status_code )
		json = response.json
		if json is None:
			raise NinjaException( 'API returned empty response (are you authenticated?)' )
		if unwrap_data:
			if json['result'] != 1 or json['error'] is not None:
				raise NinjaException( 'API responded with error: %s' % json['error'] )

src/p/y/pyninja-HEAD/pyninja/__init__.py   pyninja(Download)
from .NinjaAPI import NinjaAPI
from .NinjaException import NinjaException