GithubHelp home page GithubHelp logo

george9d / staketaxcsv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hodgerpodger/staketaxcsv

0.0 0.0 0.0 1.52 MB

python repo to create blockchain CSVs

License: MIT License

Python 99.96% Dockerfile 0.04%

staketaxcsv's Introduction

staketaxcsv

Install

  1. Install python 3.9 (one way)

  2. Install pip packages

    pip3 install -r requirements.txt
    

Usage

  • Load environment variables (add to ~/.bash_profile or ~/.bashrc to avoid doing every time):

    set -o allexport
    source sample.env
    set +o allexport
    
  • Usage as CLI

    • Remember to add your path to staketaxcsv/src to the PYTHONPATH environment variable.
    • Same arguments apply for report_algo.py (ALGO), report_atom.py (ATOM), report_*.py:
    cd src
    
    # Create default CSV
    python3 staketaxcsv/report_atom.py <wallet_address>
    
    # Create all CSV formats (i.e. koinly, cointracking, etc.)
    python3 staketaxcsv/report_atom.py <wallet_address> --format all
    
    # Show CSV result for single transaction (great for development/debugging)
    python3 staketaxcsv/report_atom.py <wallet_address> --txid <txid>
    
    # Show CSV result for single transaction in debug mode (great for development/debugging)
    python3 staketaxcsv/report_atom.py <wallet_address> --txid <txid> --debug
  • Usage as staketaxcsv module

      >>> import staketaxcsv
      >>> help(staketaxcsv.api)
      >>>
      >>> address = "<SOME_ADDRESS>"
      >>> txid = "<SOME_TXID>"
      >>>
      >>> staketaxcsv.formats()
      ['default', 'balances', 'accointing', 'bitcointax', 'coinledger', 'coinpanda', 'cointelli', 'cointracking', 'cointracker', 'cryptio', 'cryptocom', 'cryptotaxcalculator', 'cryptoworth', 'koinly', 'recap', 'taxbit', 'tokentax', 'zenledger']
      >>>
      >>> staketaxcsv.tickers()
      ['ALGO', 'ATOM', 'BLD', 'BTSG', 'DVPN', 'EVMOS', 'FET', 'HUAHUA', 'IOTX', 'JUNO', 'KUJI', 'LUNA1', 'LUNA2', 'OSMO', 'REGEN', 'SOL', 'STARS']
      >>>
      >>> # write single transaction CSV
      >>> staketaxcsv.transaction("ATOM", address, txid, "koinly")
      ...
      >>> # write koinly CSV
      >>> staketaxcsv.csv("ATOM", address, "koinly")
      ...
      >>> # write all CSVs (koinly, cointracking, etc.)
      >>> staketaxcsv.csv_all("ATOM", address)
      ...
      >>> # check address is valid
      >>> staketaxcsv.has_csv("ATOM", address)
      True
    

Docker

See Docker to alternatively install/run in docker container.

Contributing Code

  • See Linting to see code style feedback.

  • Providing a sample txid will expedite a pull request (email [email protected], DM @staketax, etc.):

    # For a given txid, your PR (most commonly) should print different output before/after:
    python3 staketaxcsv/report_osmo.py <wallet_address> --txid <txid>
    

Reference

See README_reference.md:

staketaxcsv's People

Contributors

hodgerpodger avatar jumperavocado avatar dting avatar wengzilla avatar mbolesta avatar fentas avatar pbennett avatar ishidaco avatar arirubinstein avatar 0mynona0 avatar ajdinbajric avatar angelorc avatar clevinson avatar fabianriewe avatar felixsan avatar liamsi avatar mylros avatar robertbemmann avatar nanonano avatar yliapis avatar aac9s avatar okwme avatar ebaker avatar johnny-wang avatar 0xlaine avatar ozioeh avatar

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.