Did I find the right examples for you? yes no

All Samples(3)  |  Call(0)  |  Derive(0)  |  Import(3)
int(x=0) -> int or long
int(x, base=10) -> int or long

Convert a number or string to an integer, or return 0 if no arguments
are given.  If x is floating point, the conversion truncates towards zero.
If x is outside the integer range, the function returns a long instead.

If x is not a number or if base is given, then x must be a string or
Unicode object representing an integer literal in the given base.  The
literal can be preceded by '+' or '-' and be surrounded by whitespace.(more...)

src/p/p/ppm-0.1/ppm/registryclient.py   ppm(Download)
import requests
import os
from packagehandler import PackageHandler
from config import REQUEST_TIMEOUT
 
        # download package details from registry
        url = os.path.join(self.server_adress,PACKAGES_DATABASE,packageName)
        r = requests.get(url, timeout=REQUEST_TIMEOUT)
        if r.status_code == 404:
            raise Exception("Package {p} is not in the ppm packages registry".format(p=packageName))
    def get_project_details(self, projectName):
        assert projectName
        url = os.path.join(self.server_adress,PROJECTS_DATABASE,projectName)
        r = requests.get(url, timeout=REQUEST_TIMEOUT)
        if r.status_code == 404:

src/p/p/ppm-0.1/ppm/utility.py   ppm(Download)
import json
import requests
from config import REQUEST_TIMEOUT
 
def load_json_file(depsFilePath):
def post_json_data(jsonData,server):
    assert(jsonData)
    headers = {'content-type': 'application/json'}
    r = requests.post(server, data=json.dumps(jsonData), headers=headers, timeout=REQUEST_TIMEOUT)
    return r.text
    log("downloading {u}".format(u=url))
    localName = url2name(url)
    r = urllib2.urlopen(url, timeout=REQUEST_TIMEOUT)
    if 'Content-Disposition' in r.info():
        # If the response has Content-Disposition, we take file name from it

src/p/p/ppm-0.1/ppm/repositoryclient.py   ppm(Download)
import requests
import os
from config import REQUEST_TIMEOUT
from utility import log
class RepositoryClient:
    def get_package_repository_url(self,origin):
        try:
            r = requests.post(self.server_adress,origin,timeout=REQUEST_TIMEOUT)
            if r.status_code == 200:
                return r.text