New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

confscript

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

confscript

A configuration definition language

pipPyPI
Version
1.5
Maintainers
1

confScript

don't think it is another *script language!!

It can do a lot..

install via pip

pip install confscript

let's get started!

some basic concepts:

  • headers have this syntax:
== name ==

header can be anything example: "C++" or "@(@(@(@(@!!!" anything!

  • keyword and value have this syntax:
keyword : value

here, value can be a string or number or True or False..

  • What about lists?

lists values are separated by a ","

example:

== header ==
key : value1,value2,value3
  • what separates data headers?

all headers are separated by a ---

okay? now, look at this data:

== Python ==
extensions : .py,.pyw,etc,etc
command    : python (filepath)
---
== JavaC ==
extensions : .java,
command    : javac (filepath) && java (filebasename)

Example data:

== TestingData ==
lucky word              	  : python
lucky number                  : 10
is lucky-number really lucky? : True
---
== Employee ==
name: George
age: 30
country: United Kingdom
email: george.the.great@cube.co.net.com

it will become:

{'TestingData': {'lucky word': 'python', 'lucky number': 10, 'is lucky-number really lucky?': True}, 'Employee': {'name': 'George', 'age': 30, 'country': 'United Kingdom', 'email': 'george.the.great@cube.co.net.com', 'IPv6 address (lol)': 'C0BE:5BC6:F8F0:FAB4:EB59:482F:C4D3:4DFD'}}

so what's in this module?

there are 3 functions:

read(str)      : convert confscript data to python dict & return the dict
readFile(str)  : read the given file which contains the data & return the dict
dump(dict)     : convert dict to confscript & return confscript data

simple! isn't it?

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts