https://github.com/andrewpetrochenkov/itunes.py
:snake: :musical_note: iTunes.app (macOS)
https://github.com/andrewpetrochenkov/itunes.py
applescript cli macos python
Last synced: 3 days ago
JSON representation
:snake: :musical_note: iTunes.app (macOS)
- Host: GitHub
- URL: https://github.com/andrewpetrochenkov/itunes.py
- Owner: andrewpetrochenkov
- License: unlicense
- Created: 2018-09-14T12:52:59.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-12-03T21:00:26.000Z (over 5 years ago)
- Last Synced: 2025-09-28T07:18:01.186Z (9 months ago)
- Topics: applescript, cli, macos, python
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://pypi.org/project/itunes/)
[](https://unlicense.org/)
[](https://github.com/andrewp-as-is/itunes.py/actions)
### Installation
```bash
$ [sudo] pip install itunes
```
#### Examples
`vlc.tell(applescript)` - execute applescript `tell application "VLC" ...`
```python
>>> itunes.tell('play')
```
```python
>>> itunes.play()
>>> itunes.pause()
>>> itunes.stop()
>>> itunes.next()
>>> itunes.prev()
```
playlists
```python
>>> itunes.playlists.names()
["playlist1","playlist2"]
>>> itunes.playlists.play("playlist1")
```
play_track
```python
>>> itunes.tracks.play("track_name","playlist")
```
volume
```python
>>> itunes.volume.change(10)
>>> itunes.volume.get()
10
```
mute
```python
>>> itunes.mute()
>>> itunes.muted()
True
>>> itunes.unmute()
```
process
```python
>>> itunes.pid()
7654
>>> itunes.kill()
```