Skip to main content

A package for generating Git contribution charts

Project description

GitCommitChart

This is a small python library that uses PIL to generate Github commit charts dynamically. Its very cool.

Examples

Create a simple chart

from GitCommitChart import create_git_commit_chart
import random

if __name__ == "__main__":
    # Example data array with 365 elements
    # each with a random value between 0 and 100
    data = [random.randint(0, 10) for i in range(365)] 


    # Create the Git commit chart
    image = create_git_commit_chart(data, rows_per_column=7)
    image.save("test.png")

alt text

Create a chart with labels

from GitCommitChart import create_git_commit_chart
import random

if __name__ == "__main__":
    data = [random.randint(0, 10)
            for i in range(365)]  # Example data for a year

    # Create the Git commit chart
    image = create_git_commit_chart(
        data,
        rows_per_column=7,
        horizontal_labels=["Jan", "Feb", "Mar"...
        vertical_labels=["Sun", "Wed", "Sat"],
        label_font_size=40
    )
    image.save("test.png")

alt text

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

pygitcontributionchart-0.0.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

pygitcontributionchart-0.0.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file pygitcontributionchart-0.0.2.tar.gz.

File metadata

  • Download URL: pygitcontributionchart-0.0.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for pygitcontributionchart-0.0.2.tar.gz
Algorithm Hash digest
SHA256 9fd8e29fe579d1f221958a604b6b16af9cf306ef938d4bfdbe9972740de4ae40
MD5 98595feba9ba7331727f5ee13b5987f9
BLAKE2b-256 f57b7656e3ee2e48750d190bda4f22d9056ddb27509ba71b23daafd6566fc7cd

See more details on using hashes here.

File details

Details for the file pygitcontributionchart-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pygitcontributionchart-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 641d7ab63b71f88fa49a50dd903e71d803192b17949e1ce331dfe85cd72c35ea
MD5 ec09acc08e799720ff04a8ec71749ad3
BLAKE2b-256 35807da296d16d3455c2be6462b1b49345d0e0a0b9580fd5e53299c760ac8e15

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