Git Product home page Git Product logo

instiz's Introduction

instiz

A Python3-only library for iChart K-Pop chart scores.

Code style: black

Installation

pip install instiz

Getting Started

Getting started is easy. The following example is to get the top 10 at the realtime chart of iChart.

from instiz import iChart

ichart = iChart()
top_10 = ichart.realtime_top_10()

Type hinting

If you're using Python 3.7+'s type hinting feature, the type used for the return type of the chart can be imported from the instiz.models module.

from instiz.models import Entry

def get_name(entry: Entry) -> str:
    return entry.title

Artist name

It's now possible to get the Korean name and the English name of an artist easily, alongside with the raw artist name provided from iChart's site. Nice title property will always return the English name, unless unavailable. If one of the names are unavailable, the property will return an empty string.

from instiz import iChart

ichart = iChart()
first_place = ichart.get_next_entry()
nice_title = first_place.nice_title # JENNIE - SOLO
raw_artist_name = first_place.artist.raw_name # 제니 (JENNIE)
english_artist_name = first_place.artist.english_name # JENNIE
korean_artist_name = first_place.artist.korean_name # 제니

Contributing

  • Fork the repo
  • Make your changes
  • Write your tests so I don't accidentally remove it when updating
  • Run the tests.
  • Make a pull request.

TODO

  • Document the API
  • Weekly chart

instiz's People

Contributors

chromadream avatar dependabot-preview[bot] avatar dependabot-support avatar

Watchers

 avatar  avatar

instiz's Issues

Documentation work

Here is the laydown of the documentation work that needs to be done.

  • Document every class and public functions inside

  • Set up sphinx

  • Set up the readthedocs page.

Historical chart mapping.

iChart also have a weekly chart which is available on http://www.instiz.net/iframe_ichart_score.htm?week=1&selyear=2015&sel={0}.

Mapping the chart to the library should be fairly straightforward, but a research of what each of the parameters of the query string may be needed.

Slow class instantiation

Since the actual work is done at the init function, it is really slow. This is painfully obvious if the library is used on Python's REPL.

One possible solution is to move the post-init work as a separate function to be called by the user. The function is already available as .refresh() but forcing the user to call it at the initial call may reduce the comfortability of the library.

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.