Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
ganomede-base-client
Advanced tools
Simple wrapper around restify.JsonClient
to
start with when writing own API Clients. Changes:
request()
-like method (#apiCall({method, path, body, headers, qs}, callback)
), meaning:
/api/v1
in front of all requests);body
or qs
contain req_id
param, sets x-request-id
header to value of it.Import BaseClient
and define higher-level APIs.
const BaseClient = require('ganomede-base-client');
class MyApi extends BaseClient {
constructor ({hostname = 'my-api.example.org', version = 1, apiKey}) {
super(
`https://${hostname}/version-${version}`, // base url
{headers: {'X-API-Key': apiKey}} // more options
);
}
ping (callback) {
// Will issue HTTP GET to
// https://my-api.example.org/version-1/ping?check-auth=1
//
// Callback will contain JSON response (if any, otherwise empty object),
// see restify docs for more details at:
// https://github.com/restify/clients
//
// `call` is what restify methods return (like #get(), #post(), etc.).
const call = this.apiCall(
{method: 'get', path: '/ping', qs: {'check-auth': 1}},
callback
);
}
}
Some defaults are changed from those of restify:
accept
of application/json
;accept-encoding
of gzip,deflate
.FAQs
Simple wrapper for restify.JsonClient
The npm package ganomede-base-client receives a total of 6 weekly downloads. As such, ganomede-base-client popularity was classified as not popular.
We found that ganomede-base-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.