Skip to main content

Python client library for Cowrywise Embed Investments API

Project description

Embed Python Library

The Embed Python library provides an easy access to the Embed Investment API by Cowrywise. Embed is an investment-as-a-service API that allows you to integrate investment features in your products and offer financial services to your customers at scale. With Embed, developers can create investment accounts for their customers and expose them to a wide variety of investment products!


See the Embed API docs.


Install the package directly via git

pip install git+

You could also install the library via pypi using the pip package manager.

$ pip install -U embedpy


  • Python3+


To get started, signup for developer credentials on Embed Dashboard. Once you signup, you can retrieve you client_id and client_secret keys from the developer dashboard. Set your credentials in environment variables.

# Set environment variables
CLIENT_ID = CWRY-substitute-yours-here
CLIENT_SECRET = CWRY-SECRET-substitute-yours-here

# Create an instance of the Embed Client
from embed.client import Client
client = Client()

Alternatively, instantiate the Embed Client with your credentials. You can specify a base url during this instantiation. This is optional and defaults to the sandbox base url.

from embed.client import Client
client = Client(client_id='****', client_secret='****', base_url="https://***")

Create Accounts

# Create investment account for your customer
   first_name= "Mansa",
   last_name= "Musa",
   email= ""

Create Investments

# You can invest in Assets (Mutual funds, Tbills, Stocks) or Indexes
# Get all available assets to invest in
client.assets.list_assets() or client.indexes.list_indexes()

# Create an investment with a given asset code

Transfer funds

# Transfer funds from a wallet to a savings/investments with product code
  amount=50000, #kobo/cents

Check the API reference document for more examples.


We welcome contributions from everyone. Before submitting a pull request, kindly ensure:

  • <input type="checkbox" disabled="" /> Necessary tests for the code changes requested are added
  • <input type="checkbox" disabled="" /> Code is formatted according to PEP8
  • <input type="checkbox" disabled="" /> There is clear commit messages

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for embedpy, version 2.0.0
Filename, size File type Python version Upload date Hashes
Filename, size embedpy-2.0.0-py3-none-any.whl (21.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size embedpy-2.0.0.tar.gz (12.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page