GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - codehub-ir/codehub-cli: Codehub CLI tool written in Python (Paste within your python projects with no pain)

BranchesTags
Open more actions menu

Latest commit

 

History

32 Commits
32 Commits

Folders and files

NameName
Last commit message
Last commit date
git_components
git_components
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
components.py
components.py
 
 
conf.json
conf.json
 
 
main.py
main.py
 
 
requirements.txt
requirements.txt
 
 
update.py
update.py
 
 

Repository files navigation

CodeHub-CLI

Simple CodeHub command-line client program uses API services. Start editing the main.py file, then try to make your queries and run them up.

Get a Snippet ⇒ main.py
from components import GetSnippet

snippet = GetSnippet('<SID>')       # GetSnippet Obj
data = snippet.get()                # Data retrievement
print(data)
Push a Snippet ⇒ main.py
from components import GetSnippet, PushSnippet, Language

configs = {
    'title': 'TITLE',
    'script': 'SCRIPT',
    'language': 'go',
}

snippet = PushSnippet(**configs).push()
print(snippet)

Optionals

There are some fields you are able to leave them empty. detail and error fields are the optional parameters you may not want to fill them up, so you use the exact keywords to give other parameters the values you want.

from components import GetSnippet, PushSnippet, Language

configs = {
    'title': 'TITLE',
#   'details': 'DETAILS',  Optional
    'script': 'SCRIPT',
#   'error': 'ERROR',      Optional
    'language': 'go',
}

snippet = PushSnippet(**configs).push()
print(snippet)
Custom Language Model

You can also use Language class to use the default languages of the program. You might use a language which is not listed in the Language class, so write it by yourself. Up to 500 languages are available now.

from components import PushSnippet, Language

lang = Language()
snippet = PushSnippet(..., lang.python) # Or PushSnippet(..., 'python')
snippet.push()

Develop it

Make changes in the main file or carry up the classes in your program. Don't forget the GPL-3.0. Develop it for free :)

About

Codehub CLI tool written in Python (Paste within your python projects with no pain)

codehub.pythonanywhere.com

Topics

apiapi-restclicodehubdjangodjango3pastebinpesianpythonpython3restful-apiservicewebsite

Resources

Readme
GPL-3.0 license
Activity
Custom properties

Stars

5 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.