![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
fnet-py-import-parser
Advanced tools
A Python dependency analyzer for import parsing and metadata extraction.
fnet-py-import-parser
is a powerful Python dependency analyzer that parses import
statements, extracts metadata, and provides insights into your project's dependencies. It supports detecting unused imports, resolving circular dependencies, and exporting results in structured formats like JSON or YAML.
Install the package using pip:
pip install fnet-py-import-parser
The tool provides a CLI for analyzing Python files.
fnet-py-import-parser --entry_file path/to/your_script.py --output_format json
--entry_file
: The entry point Python file for analysis (required).--output_format
: The format for the results (json
or yaml
).example.py
import os
import sys
# @hint: requests (channel=pypi)
import requests
from mymodule import myfunc
fnet-py-import-parser --entry_file example.py --output_format json
{
"all": [
{
"type": "builtin",
"path": "os",
"imported_by": [
{
"path": "example.py",
"used": true,
"line": 1
}
]
},
{
"type": "builtin",
"path": "sys",
"imported_by": [
{
"path": "example.py",
"used": true,
"line": 2
}
]
},
{
"type": "package",
"path": "requests",
"imported_by": [
{
"path": "example.py",
"used": true,
"line": 3
}
],
"metadata": {
"package": "requests",
"channel": "pypi"
}
},
{
"type": "local",
"path": "mymodule",
"imported_by": [
{
"path": "example.py",
"used": true,
"line": 4
}
]
}
],
"unreferenced": [],
"unnecessary": [],
"required": {
"builtin": [
{
"type": "builtin",
"path": "os"
},
{
"type": "builtin",
"path": "sys"
}
],
"third-party": [
{
"type": "package",
"path": "requests",
"metadata": {
"package": "requests",
"channel": "pypi"
}
}
],
"local": [
{
"type": "local",
"path": "mymodule"
}
]
}
}
You can also use fnet-py-import-parser
programmatically in your Python projects.
from src.index import default
kwargs = {
"entry_file": "path/to/your_script.py",
"output_format": "yaml"
}
result = default(**kwargs)
print(result)
This project is licensed under the MIT License. See the LICENSE
file for details.
This README provides a complete, concise, and user-friendly introduction to your project, ensuring anyone can easily understand and get started with it. 🚀
FAQs
A Python dependency analyzer for import parsing and metadata extraction.
We found that fnet-py-import-parser 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.