Skip to main content

A fun Python package to generate random songs, select random singers, and find singers by name.

Project description

🎵 Song Singer Generator

CI


Song Singer Generator is a Python package that allows you to create and manage song collections by genre and artist. It enables developers to:

  • Add new artists and songs
  • Search for specific names
  • Generate random songs and singers

📦 Package on PyPI

👉 Visit the PyPI Page


🚀 Installation

You can install the package directly from PyPI:

pip install songsingergenerator

💡 How to Use

Here's how you can import and use the package in your Python project:

➡️ Importing the package:

from songsingergenerator import music

➡️ Example Code:

Example for adding a new singer and song:

from songsingergenerator.music import add_singer, random_song, random_singer, find_singer

# Add a singer and their songs
add_singer("Adele", "pop", ["Hello", "Someone Like You", "Rolling in the Deep"])

# Get a random song from the 'pop' genre
print(random_song("pop"))

# Get a random singer from the 'pop' genre
print(random_singer("pop"))

# Find a singer containing the word 'Adele'
print(find_singer("Adele"))

🛠️ Available Functions

Function Description Example
add_singer(singer, genre, songs=None) Adds a new singer and their songs to the collection. add_singer("Adele", "pop", ["Hello"])
random_song(genre=None) Returns a random song from a specific genre (or any genre if none is specified). random_song("pop")
random_singer(genre=None) Returns a random singer from a specific genre. random_singer("pop")
find_singer(keyword) Searches for singers whose names contain the specified substring. find_singer("Adele")

🏗️ Contributing

We welcome contributions! Here’s how to get started:

1. Clone the repository:

git clone https://github.com/software-students-spring2025/3-python-package-solapis.git
cd 3-python-package-solapis

2. Set up the virtual environment

We use Pipenv for managing dependencies.

  • Install Pipenv:

    pip install pipenv
    
  • Install dependencies (including build):

    pipenv install --dev build
    

3. Activate the environment

Activate the Pipenv virtual environment:

pipenv shell

4. Build the package

Use build to create package artifacts:

pipenv run python -m build

5. Prepare and run tests

Before running tests, install the package in editable mode. Then, run tests using pytest:

pipenv run pip install -e .
pipenv run pytest test/

👥 Team

Name GitHub Profile
Yang Hu @younghu312
Ziqi Huang @RyanH0417
Zirui Han @ZiruiHan
Zichao Jin @ZichaoJin

🌐 Running the Project

To run the project locally:

  1. Clone the repository.
  2. Set up the virtual environment with Pipenv.
  3. Run the test suite to make sure everything is working:
pipenv run pytest test/
  1. Import the package and use it as described in the How to Use section.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

songsingergenerator-0.1.2.tar.gz (43.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

songsingergenerator-0.1.2-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file songsingergenerator-0.1.2.tar.gz.

File metadata

  • Download URL: songsingergenerator-0.1.2.tar.gz
  • Upload date:
  • Size: 43.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.2

File hashes

Hashes for songsingergenerator-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b5b93555c418821d740ea1d525034f2c5ef598ee87b93a985602989711bcb3d1
MD5 abb82862b7f201b29f4dfef30a686004
BLAKE2b-256 cbdab65d7ba57a291b3e5347e9744344a091e2d4b267257150ad16762a5f7242

See more details on using hashes here.

File details

Details for the file songsingergenerator-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for songsingergenerator-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 162d6075f39edb4f697fb567874a33c2d07233e9208a13a79316c374f01fdc56
MD5 20582ef16385a4430a8d74586220a05e
BLAKE2b-256 64210aef1aba5b70e6fbbd7953b354c804d53c506b93a0d268d49833678786bb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page