======
[](https://landscape.io/github/ellisonleao/pyzeef/master)
[](https://travis-ci.org/ellisonleao/pyzeef)
Welcome to the Python Zeef API lib.
# Table of contents
- [Installing](#installing)
- [Basic Usage](#basic-usage)
- [The Zeef Class](#the-zeef-class)
- [The Page Class](#the-page-class)
- [The Block Class](#the-block-class)
- [The Link Class](#the-link-class)
## Installing
Using pip:
```
pip install pyzeef
```
or cloning installing the current build
```
git clone https://github.com/ellisonleao/pyzeef.git
cd pyzeef
python setup.py develop
```
I strong recommend using a virtualenv before installing any of the methods above.
## [Basic Usage](#basic-usage)
Before get things started, you will need a ZEEF Token in order to use the lib.
To generate a new token, please [go here](https://zeef.com/dashboard/user/profile/tokens)
After generating your token:
from pyzeef import Zeef
```python
z = Zeef('YOUR-TOKEN')
print z.pages
# Output
[
<Page ID>,
...
]
```
### [The ZEEF Class](#zeef-class)
## `Zeef(token, persist_pages=True, get_scratchpad=True)`
When instantiating a new Zeef class all of your pages and the scratchpad will also be persisted by default. If you don't want to fetch the pages and/or the scratchpad you can pass `persist_pages` and `get_scratchpad` kwargs when creating the new class
#### Methods
#### `authorize(token=None, persist_pages=True)`
That method will be called on the object creation if `persist_pages=True`. It will authorize and persist your token through all the API requests and also fetch/persist your ZEEF pages. You can also pass a new
token when instantiating the class. That token will be persisted to be used on the future requests.
#### `get_page(page_id=int, alias=string, username=string)`
You can fetch a page by passing the `page_id` or passing both `alias` and `username`
This wil return a [Page](#page) class.
### `get_block(block_id)`
This will return a [Block](#block) class object, if any block is found with the `block_id` provided.
### `get_link(link_id)`
This will return a [Link](#link) class objects, if any link is found with the `link_id` provided.
### `create_page(name, language='en', type=['SUBJECT', 'COMPANY', 'PERSONAL'])`
Quick method to create a new page, given the name, language and the type. This will return a Page instance with the new page information.
### Main properties
- `page` - This will return the fetched pages list, as [Page](#page) objects.
### [The Page Class](#page)
When fetching the pages, there is a helper class which can help you make Zeef Page CRUD operations.
#### Methods
#### `update(type=['SUBJECT', 'COMPANY'], description='your description')`
Updates the current page. Both fields are optional.
### `to_markdown()`
This will output your ZEEF page in a markdown format.
### Main Properties
- `blocks` - A page can contain multiple blocks. When retrieving a page, the blocks property will return a list of [Block](#block) objects to help on block API operations.
- `title` - Page's title.
### [The Block Class](#block-class)
### Methods
### `update(data)`
Updates the current block with given data dict. `data` keys can be:
- `title` - String
- `promoted` - Boolean
- `publicly_visible` - Boolean
For `link` type blocks, we can add:
- `description` - String
For `feed` type `blocks`, we can add:
- `feed_url` - URL String
- `max_links` - Integer
- `refresh_minutes` - Integer
### `delete()`
Deletes the block from the Page
### Main Properties
- `links` - A list of [Link](#link) objects to help links API operations
- `title` - Block's title
- `type` - Block's type
### [The Link Class](#link-class)
### Methods
### `update(link='http://mylink.com', description='text', title='title')`
Updates the current link with the provided kwargs.
### `delete()`
Deletes the link
### Main Properties
- `title` - Link's title
- `url` - Link's URL
Metadata
Release files for pyzeef 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyzeef-0.1.3.tar.gz | 11.0 kB | Without provenance | Details for pyzeef-0.1.3.tar.gz |
Release files / pyzeef-0.1.3.tar.gz
| Download URL | pyzeef-0.1.3.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6554b5d3348fc321094bfef6b19a47236a7e5ddf6f1b04adaba7e00a3e738c59
|
|
BLAKE2b-256 checksum How to use checksums |
cf2faf0ff1cf2ea3a8db9317af7e5e21eddf61ac1800f6039580001380f08951
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pyzeef 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.