Giter Club home page Giter Club logo

dyma's Introduction

Dyma: Your Dynalist Manager

Static Badge Static Badge PyPI - Version

Note: This project is in very early stage. Major changes could happen and cause conflict with current usage.

Features

Dynalist API manager, written in Python.

Back up all your files and folders in just one line.

Usage

0. setup

You can install this package from PyPI

pip install dyma

1. start

from dyma import DyManager

dm = DyManager(token="") # insert your token here

# or
dm = DyManager()
dm.token = "" # insert your token here

2. file-level usage

# fetch all files
files = dm.file.fetch_all()

# make changes: move, edit, create
results = dm.file.edit(type='document', id="your document id", title="new title")

results = dm.file.move(type='folder', id="your foler id", parent_id="parent id", index=3)

results = dm.file.create(type='document', parent_id='parent id', index=3, title='new title')

# the above equals to

results = dm.file(action='edit', ...) # action= edit | move | create, other paramters are the same

3. document-level usage

# get content of a document
results = dm.doc.get(id="your file id")

# check if documents has been updated
result = dm.doc.check(ids="your file ids") # or use list of file ids

# make change to che content of a document
results = dm.doc.insert(id='your doc id', parent_id = 'parent node id (default: root)', content='hello world')

result = dm.doc.edit(id='your doc id', node_id='node id', content='hello world')

result = dm.doc.move(id='your doc id', node_id='node id', parent_id='parent node id', index=3)

result = dm.doc.delete(id='your doc id', node_id='node id')

results = dm.doc(action='insert',...) # action= insert | edit | move | delete, other paramters are the same

4. account-level usage

# sent to inbox
results = dm.send_to_inbox(index=-1, content='hello world', note="", checked=True, checkbox=True)

# upload file (Pro only)
results = dm.upload(filename='', content_type='', data='')

# get preference
result = dm.get_preference(key='')

# set preference
result = dm.set_preference(key='', value='')

5. advanced features

# one-line backup
dm.backup()

dyma's People

Contributors

maho avatar peisong13 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

maho

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.