pycrunchbase¶
-
class
pycrunchbase.Acquisition(data)[source]¶ Represents a Acquisition on CrunchBase API Docs: https://developer.crunchbase.com/docs
-
class
pycrunchbase.FundingRound(data)[source]¶ Represents a FundingRound on CrunchBase API Docs: https://developer.crunchbase.com/docs
-
class
pycrunchbase.Organization(data)[source]¶ Represents an Organization on CrunchBase API Docs: https://developer.crunchbase.com/docs
-
class
pycrunchbase.Page(name, data)[source]¶ A Page represents a a page of results returned by CrunchBase. Page contains useful information regarding how many items there are in total (total_items), items per page (items_per_page), etc.
A page contains information for going to the prev/next page (if available).
The data that is used to initialize a Page looks like this:
"data": { "paging": { "items_per_page": 1000, "current_page": 1, "number_of_pages": 1, "next_page_url": null, "prev_page_url": null, "total_items": 1, "sort_order": "custom" }, "items": [ { "updated_at": 1423666090, "created_at": 1371717055, "path": "organization/example", "name": "Example", "type": "Organization" } ] }A special note is that current_page might be 0, this is when the page is returned as part of a
Relationship.-
__getitem__(key)[source]¶ Allows caller to use array indices to get a
PageItemParameters: i (int) – 0-based index of the element to retrieve Returns: if valid item exists at index i None if the index is too small or too large Return type: PageItem
-
-
class
pycrunchbase.PageItem(data)[source]¶ A item within a Page.
A page is a homogenous collection of PageItem, and there are many kinds of PageItem.
build()is a helper class method to help build the correct type of PageItem based on- path, or
- type
-
class
pycrunchbase.Person(data)[source]¶ Represents a Person on CrunchBase API Docs: https://developer.crunchbase.com/docs
-
class
pycrunchbase.Product(data)[source]¶ Represents a Product on CrunchBase API Docs: https://developer.crunchbase.com/docs
-
class
pycrunchbase.Relationship(name, data)[source]¶ A Relationhip represents relationship between a Node and interesting information regarding the Node.
This is a summary returned alongside the Node details information, e.g. ad call to /organizatin/example will return many properties and many relationships.
To get more details of this relationship, call
CrunchBase‘smore().
-
class
pycrunchbase.CrunchBase(api_key=None)[source]¶ Class that manages talking to CrunchBase API
-
acquisition(uuid)[source]¶ Get the details of a acquisition given a uuid.
Returns: Acquisition or None
-
funding_round(uuid)[source]¶ Get the details of a FundingRound given the uuid.
Returns: FundingRound or None
-
get_node(node_type, uuid, params=None)[source]¶ Get the details of a Node from CrunchBase. The node_type must match that of CrunchBase’s, and the uuid is either the {uuid} or {permalink} as stated on their docs.
Returns: containing the data describing this node with the keys uuid, type, properties, relationships. Or None if there’s an error. Return type: dict
-
more(page)[source]¶ Given a Page, tries to get more data using the first_page_url or next_page_url given in the response.
If page happens to be a Relationship, i.e. page.first_page_url is not None, we just call that url to retrieve the first page.
Returns: None if there is no more page to get, else Relationship with the new data
-
organization(permalink)[source]¶ Get the details of a organization given a organization’s permalink.
Returns: Organization or None
-
organizations(name)[source]¶ Search for a organization given a name, returns the first
Pageof resultsReturns: Page or None
-