GithubHelp home page GithubHelp logo

sommalia / moco-explorer Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 138 KB

CLI tool for working with the moco api

License: GNU General Public License v3.0

Makefile 3.45% Python 96.55%
moco python3 python3-only

moco-explorer's Introduction

moco-explorer

image

image

Documentation Status

The quick and easy interface for exporting data from moco.

  • Free software: GNU General Public License v3

Disclaimer

This project is in no way finished, or polished. I am not responsible for any commercial, financial or emotional damage that may or may not be caused by using this project.

Features

  • Easy access to your moco data
  • Csv/Json/Text Export
  • Authentication over cli with username and password

Requirements

  • python 3.5 or greater
  • moco_wrapper 0.6.2 or greater

Installation

From source

$ git clone https://github.com/sommalia/moco_explorer moco-explorer
$ cd moco-explorer
$ pip install -r requirements_dev.txt
$ make install

From pip

$ pip install moco_explorer

Quickstart

Authentication

To retrieve information from yout moco instance the moco_explorer needs to authenticate with it. For your first request, it will stop and ask for your account information.

You can also manually create the configuration file with moco_explore config create.

$ moco_explorer config create
$ > Enter your moco domain: testcompany.mocoapp.com // testcompany would also work
$ > Enter your moco email: [email protected]
$ > Enter your moco password: *******

After that a config file in your users home directory will be created.

$ cat $HOME/.moco_explorer.json
{
    "domain": "testcompany",
    "api_key": "HERE IS THE API KEY"
}

If you want to load or create your configuration file in an alternative location you can specify the path with the -c/--config option.

$ moco_explorer -c $HOME/alternative-moco-config.json config create

By default the moco_explorer will look for the configuration file under $HOME/.moco_explorer.json. If you created the configuration file in an alternative location make sure you always specify the -c/--config option.

What can I do?

Currently the following endpoints can be queried (also accessible with moco_explorer --help)

activity
company
contact
deal
    category
invoice
    payment
offer
planning-entry
project
    contract
    expense
    payment_schedule
    recurring_expense
    task
schedule
user
    employment
    holiday
    presence
unit

Retrieving a list of all contacts in csv format

$ moco_explorer -f csv contact getlist -a

Retrieving a single company object (id 123) in json format

$ moco_explorer -f json company get 123

Get an overview over a specific project (id 1233)

$ moco_explorer -f text project get 1233

Work through the pages of the projects (100 items per page). If you have more than 100 objects, the results are paginated (eg. for 105 items, the first page will contain 100, the second 5 items).

$ moco_explorer -f json project getlist --page 1
$ moco_explorer -f json project getlist --page 2

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

moco-explorer's People

Contributors

sommalia avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

honsa

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.