
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Camus is a raw SQL library enabling an ease integration with the new Aurora Serverless Data API. Its API is based on the powerful Records library.
The recommended installation method is pipenv
:
$ pipenv install camus
First you need to have an Aurora cluster ARN and a Secret ARN. If don't have one yet, just follow the Data API Getting Started Guide.
With that in hands, let's drop some query in our database:
import camus
db = camus.Database(
resource_arn="arn:aws:rds:us-east-1:123456789012:cluster:your-cluster-name",
secret_arn="arn:aws:secretsmanager:us-east-1:123456789012:secret:your-secret-name-ByH87J",
dbname="mydb",
)
rows = db.query("SELECT * FROM users")
You can grab one row at time (like in Records library)
>>> rows[0]
<camus.Record at 0x109bfbd30>
Or iterate over them:
for r in rows:
print(r.name, r.email)
Like mentioned before, Camus tries to maintain the same API of the Records library, so you have the same access patterns:
row.email
row['email']
row[3]
Other options include rows.as_dict()
and rows.as_dict(ordered=True)
Data API transactions are supported by Camus:
with db.transaction() as txid:
db.query("INSERT INTO users (name, email) VALUES (:name, :email)", name="Rafael", email="rafael@email.com")
db.query("UPDATE posts SET title = :title WHERE id = :id", title="New Title", id=999)
If any exception is raised when executing any of the queries, a rollback is performed automatically.
Thanks for the awesome @kennethreitz for providing his knowledge on the excelent Records library and all the talks he has given over the years!
FAQs
A Records like database API that works with Aurora Serverless Data API
We found that camus demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.