• Stars
    star
    190
  • Rank 203,739 (Top 5 %)
  • Language
    Python
  • License
    GNU Lesser Genera...
  • Created over 4 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Unofficial API for generating beautiful images of your source code using Carbon.

Carbon API [Unofficial]


Carbon
Unofficial API

Show some ❤️ and the repo

GitHub stars GitHub followers Telegram Channel

Carbon API written in Python using Flask and Pyppeteer

made-with-python Open Source Love svg1

Carbon makes it easy to create and share beautiful images of your source code

Usage

You can use the API by sending a GET or a POST request using these params

parameter default type description
code (required) string Code snippet
backgroundColor "rgba(171, 184, 195, 1)" string Hex or rgba color
dropShadow true boolean Turn on/off shadow
dropShadowBlurRadius "68px" string shadow blur radius
dropShadowOffsetY "20px" string shadow offset y
exportSize "2x" string resolution of exported image, e.g. 1x, 3x
fontSize "14px" string font size
fontFamily "Hack" string font family, e.g. JetBrains Mono, Fira Code.
firstLineNumber 1 number first line number
language "auto" string programing language for properly highlighting
lineNumbers false boolean turn on/off line number
paddingHorizontal "56px" string horizontal padding
paddingVertical "56px" string vertical padding
theme "seti" string code theme
watermark false boolean turn on/off watermark
widthAdjustment true boolean turn on/off width adjustment
windowControls true boolean turn on/off window controls
windowTheme "none" string window theme

GET /

Params are encoded in url

https://carbonnowsh.herokuapp.com/?code=Made+with+Love+in+India+by+Sumanjay&theme=darcula&backgroundColor=rgba(144, 19, 254, 100)

POST /

Body is JSON with these params:

{
    "backgroundColor": "rgba(144, 19, 254, 100)",
    "code": "Made with Love in India by Sumanjay",
    "theme": "dracula"
}

RESPONSE

Response is an image of a code or text snippet.

Response

Deploy Option

  • Heroku Method Deploy

  • Other Method

    # Clone the repo
    git clone https://github.com/cyberboysumanjay/Carbon-API
    cd Carbon-API
    
    # Create virtualenv
    virtualenv -p /usr/bin/python3 venv
    ../venv/bin/activate
    
    # Install requirements
    pip3 install -r requirements.txt
    
    # Finally run the app
    python3 app.py

Made with ❤️️ in India

Copyright & License

More Repositories

1

JioSaavnAPI

An unofficial API for JioSaavn written in Python 3
Python
360
star
2

Inshorts-News-API

Unofficial API of Inshorts written in Flask
Python
222
star
3

APIs

This Repository contains link to many Open or Closed Source APIs which I've made
145
star
4

GaanaAPI

Unofficial Gaana API
Python
113
star
5

Gdrivedownloader

Just enter the direct URL of the file and it will upload it to Google Drive and print download link of it.
Python
93
star
6

upayi

Create shareable links for your UPI ID
HTML
58
star
7

TorrFlix

A simple torrent streamer written in python.
Python
57
star
8

UdemySales

Android App for grabbing paid Udemy courses for free during sales using coupon codes
Dart
51
star
9

Torrent-Searcher

[DEPRECATED] A simple torrent file searcher written in Python
Python
37
star
10

InstaFlask

A flask app to fetch Instagram Profile details, get downloadable High Definition DP/Photos/Videos of users from link.
HTML
35
star
11

RealTimeCryptoPrice

Plots Real-Time Crypto Currency Price
HTML
30
star
12

pw

Best websites a Programmer should visit
HTML
28
star
13

JioMusicAPI

[Deprecated] An unofficial API for JioMusic written in Python 3
Python
28
star
14

ocrbot

Optical Character Recognition (OCR) implementation in Telegram Bot
Python
20
star
15

CourierAPI

API for getting tracking updates of Courier Service Providers
Python
17
star
16

click2whatsapp

Click to chat with unsaved WhatsApp Number.
CSS
12
star
17

torrent

Unblocked Torrent Sites
CSS
11
star
18

VoiceAssistant

Python Project
Python
7
star
19

CashbackCardComparisonTool

A tool to compare cashbacks provided by various cashback cards
JavaScript
7
star
20

Telegram-ChatBot

A chat bot for Telegram based on Chatterbot
Python
7
star
21

jsonproxy

[Deprecated] List of Indian Proxies updated every 15 mins.
Python
5
star
22

web

This contains add-ons for my website
JavaScript
4
star
23

tgsubsapi

Telegram Live Subs API
Python
4
star
24

cyberboysumanjay

3
star
25

BinanceFuturesBalanceDashboard

Get realtime Binance Futures Wallet Details
JavaScript
3
star
26

AI-Training

Jupyter Notebooks and other files used in AI Training
Jupyter Notebook
3
star
27

evaluator

Automated Evaluation of Answers using ML
HTML
2
star
28

additional_files

2
star
29

chat-ui

Open source chat widget UI
CSS
2
star
30

python-codes

All Source Codes of the Python HP Summer Training.
Python
2
star
31

storage

Solution for uploading and downloading Files. This helps in uploading and downloading files from my Google Drive without logging in!
CSS
1
star
32

Semester6

NIT Delhi Lab Works of Semester 6
C
1
star
33

C-Assignments

This Repo contains all my Assignments of Computer Science
C
1
star
34

Java-Practice-Codes

This repo will contains my mayNucleus assignment codes
Java
1
star
35

Semester4

Lab works
C++
1
star
36

TOAD

Theory of App Development Course Codes
Java
1
star
37

NetworkSecurityLab

Lab works for Network Security Lab
Python
1
star
38

satish

Portfolio of Pappu
CSS
1
star