GithubHelp home page GithubHelp logo

siathalysedi / galiboo-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joeirimpan/galiboo-python

0.0 3.0 0.0 66 KB

Official Python SDK for Galiboo's Music API

Home Page: https://apidocs.galiboo.com

License: GNU General Public License v3.0

Python 100.00%

galiboo-python's Introduction

Galiboo

Python SDK for Galiboo's A.I. Music API (beta)

https://galiboo.com

API key

Be sure to get an API key from https://galiboo.com to use this library.

Installation

pip install galiboo

Usage

Here are some examples. You can also checkout our API docs at: https://apidocs.galiboo.com

Authentication

Always set your API key first, before calling any other API endpoints.

from galiboo import Galiboo
galiboo_client = Galiboo("<your api key>")

AI-powered search for music

Find tracks that are relevant to any natural language query, auto-magically.

from galiboo import Galiboo
galiboo_client = Galiboo("<your api key>")

# Let's search for some relaxing music
query = "soft, piano tunes"
tracks = galiboo_client.track.smart_search(query)

Get a track's music analysis data

from galiboo import Galiboo
galiboo_client = Galiboo("<your api key>")

# Let's get the moods, emotions, & other music analysis data
# that Galiboo's Music A.I. has extracted for Coldplay's "Viva la Vida"

viva_la_vida = galiboo_client.track.get("5a3fc326d836490c18703e3f")

print viva_la_vida['analysis']
print viva_la_vida['analysis']['smart_tags']
# etc...

Find tracks by tags

from galiboo import Galiboo
galiboo_client = Galiboo("<your api key>")

# Let's find some nice music for doing focus work
query = {
    "energy" : 0.25,
    "smart_tags" : {
         "Emotion-Calming_/_Soothing" : 0.9
    }
    # etc. (see our API docs for more info)
}

tracks = galiboo_client.track.search_by_tags(query)
print tracks

Find similar-sounding tracks

from galiboo import Galiboo
galiboo_client = Galiboo("<your api key>")

# Let's find similar tracks to Coldplay's Viva la Vida
similar_tracks = galiboo_client.track.search_by_similar("5a3fc326d836490c18703e3f")

print similar_tracks

Analyze music from a URL

from galiboo import Galiboo
galiboo_client = Galiboo("<your api key>")

# Let's analyze the audio at this URL
audio_url = "https://storage.googleapis.com/gb_spotify20k/spotify_preview_audios/4iLqG9SeJSnt0cSPICSjxv.mp3"
analysis = galiboo_client.track.analyze(audio_url)

print analysis

Analyze music from a YouTube video

from galiboo import Galiboo
galiboo_client = Galiboo("<your api key>")

# Let's analyze the audio at this URL
youtube_video = "https://www.youtube.com/watch?v=nfs8NYg7yQM"
analysis = galiboo_client.track.ai_analyze(youtube_video)

print analysis

Schedule a music analysis job

from galiboo import Galiboo
galiboo_client = Galiboo("<your api key>")

# Let's schedule a job in Galiboo's cloud to analyze the audio at this URL
audio_url = "https://storage.googleapis.com/gb_spotify20k/spotify_preview_audios/4iLqG9SeJSnt0cSPICSjxv.mp3"
job = galiboo_client.track.analyze(audio_url)

print job

View a music analysis job

from galiboo import Galiboo
galiboo_client = Galiboo("<your api key>")

# Let's get the status/results of an analysis job that we scheduled
job_id = "5b8c17c9011610000bc2de67"
job = galiboo_client.job.get(job_id)

print job

View all music analysis jobs

from galiboo import Galiboo
galiboo_client = Galiboo("<your api key>")

# Let's get the status/results of all the analysis jobs that we scheduled
jobs = galiboo_client.job.all()
print jobs

Search for tracks

from galiboo import Galiboo
galiboo_client = Galiboo("<your api key>")

# Let's search for Charlie Puth's Attention
track = "Attention"
tracks = galiboo_client.track.get(track=track)

Search for artists

from galiboo import Galiboo
galiboo_client = Galiboo("<your api key>")

# Let's search for some relaxing music
artist = "Camila Cabello"
artists = galiboo_client.artist.get(artist)

Get an artist's metadata

from galiboo import Galiboo
galiboo_client = Galiboo("<your api key>")

coldplay = galiboo_client.artist.metadata("5a3fc2ffd836490c18703c7d")

print coldplay['tracks']

Last words

Be sure to checkout our API docs at apidocs.galiboo.com and visit our website (galiboo.com) for more information.

If you have any questions, feel free to email us at [email protected], and we'll get back to you ASAP! :)

galiboo-python's People

Contributors

techscientist avatar thecooltechguy avatar joeirimpan avatar

Watchers

Arnstein Henriksen avatar James Cloos avatar  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.