Syntax highlighting package example
Introduction
This package provides nothing but readme that contains code samples that should be rendered nicely by PyPI warehouse.
Examples
Python example
import some_lib
from mock_package import PointlessInheritance
CONST = [n**2 for n in range(5)]
# spam with eggs
@requires_authorization
def somefunc(param1='', param2=0):
r'''A docstring'''
if param1 >= param2: # interesting
breakpoint()
print('Gre\'ater')
print(f"Even more awesome greater: {param}")
return (param2 - param1 + 1 + 0b10) or None
class SomeClass(PointlessInheritance):
"""This is a dummy class """
def __init__(self, some_param=[]):
pass
message = '''interpreter
... prompt'''
Javascript example
import { Application } from "stimulus";
//comment on some arrow function
docReady((block, cls) => {
if (navigator.appVersion.includes("MSIE 10")) {
if (document.getElementById("unsupported-browser") !== null) return;
let warning_div = document.createElement("div");
if (cls.search(/\bno\-highlight\b/) != -1)
return process(block, true, 0x0F) + ` class="${cls}"`;
}
for (var i = 0 / 2; i < classes.length; i++) {
if (checkCondition(classes[i]) === undefined)
var img1 = document.querySelector('.img-1');
img1.addEventListener('load', function() {
console.log('undefined');
});
}
});
export $docReady;
Bash example
#!/bin/bash
###### CONFIG
SOME_CONSTANT="/path/string/example"
BE_VERBOSE=false
if [ "$UID" -ne 0 ]
then
echo "Superuser rights required"
exit 2
fi
someRandomFunc(){
for i in $(ls -la ~/); do cat $i; done;
echo -e "# I'm in ${HOME_DIR}$1/$2 :"
}
Changelog
0.1.0 (2018-08-29)
First version of syntax highlighting example package
Metadata
Release files for pypi-code-highlighting-demo 0.1.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pypi-code-highlighting-demo-0.1.13.tar.gz | 2.6 kB | Without provenance | Details for pypi-code-highlighting-demo-0.1.13.tar.gz |
Release files / pypi-code-highlighting-demo-0.1.13.tar.gz
| Download URL | pypi-code-highlighting-demo-0.1.13.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
66a3be9d36e745fb4d9b67ae399fc2c16a9732a85a59dfebacc23da12f6d62f6
|
|
BLAKE2b-256 checksum How to use checksums |
6d2833eeafd8941f435fcbd239ebc6465f848287981ce61310a5171c27df3682
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/36.5.0 requests-toolbelt/0.8.0 tqdm/4.21.0 CPython/3.6.3
|
Security for pypi-code-highlighting-demo 0.1.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.