Organization Factory

The Organization factory is built with Organization credentials and has access to both the Directory Client and the Service Client.

Creating an Organization Factory

An Organization factory can be created by using the OrganizationFactory class. It utilizes Organization specific credentials to identify itself, encrypt and sign the request data, and verify the signature and decrypt encrypted response data. All of the information can be located on the Keys tab of the Organization's page in Admin Center. The data is as follows:

  • Organization ID
  • Private Key


from launchkey.factories import OrganizationFactory
organization_id = "9e0310ba-d9d6-11e6-942a-b4750ee43a10";
private_key = "-----BEGIN RSA PRIVATE KEY-----\n" \
        "MIIBOwIBAAJBALEihtCuDrAp35QpaUZ+ycfsdsCGRQGUz8nbkNwP2XsCZPqamj2A\n" \
        "QF3Tgod8tTCvvEw4X1YUuHposQnDiYkb3bkCAwEAAQJBALECAZpy9PaRQXy7TRpH\n" \
        "BLil0Z1eD4MfA+2BXeaqZ/eEqRyGzPqTYP+Ch6EB8t+xuWMoG3xgA55AxTle++TG\n" \
        "dQECIQDdadMLa2z9e8cPQ42+XU4vtPdh3P2Okewg6ST9wYOhkQIhAMzOCKcDC7Pz\n" \
        "eg3SKvG40i2/VLJfHP72gLFkdIb2+GWpAiBi5bbfve8j1hrW5Yy1gAXBZ2qsKsKS\n" \
        "4PkAxkLAmaRLEQIhAMT7ngLUwRrRoaFNdZSMyUrK7fGp3b+048666gEt5XgRAiBf\n" \
        "UHCrSnIR6lx7FksBbVZdvqNZViJL1kVVLNXa9JgHiw==\n" \
        "-----END RSA PRIVATE KEY-----\n"

organization_factory = OrganizationFactory(organization_id, private_key);

Accessing The Directory Client

The Directory Client can be accessde by providing a Directory ID for a Directory belonging to the Organization as follows:

directory_id = "f10d644a-b392-42e5-aaba-e722838adf67";
directory_client = organization_client.make_directory_client(directory_id);

Accessing the Service Client

The Service Client can be accessed by providing a Service ID for a Service belonging to the Organization or one if its Directories as follows:

service_id = "b1d05c28-0b18-41e4-94a0-853758eeefc8";
service_client = organization_client.make_service_client(service_id);

User Contributed

LaunchKey links to user contributed code as a resource to its community. LaunchKey does not in any way guarantee or warrant the quality and security of these code bases. User contributed code is supported by the creators. If you do find a link from the site to user contributed code that is malicious or inappropriate in any way, please report that link to LaunchKey immediately and we will investigate the claim. Submit any issue to LaunchKey support at ×