{"id":8837,"library":"artifactory","title":"Artifactory (parallels/artifactory)","description":"The `artifactory` library, currently at version 0.1.17, provides a Python interface for interacting with JFrog Artifactory. It's designed as a pathlib-like module for object-oriented path manipulations for Artifactory resources. However, this repository is largely unmaintained and considered outdated, with an active fork (`dohq-artifactory` / `pyartifactory`) being the recommended alternative for modern Python environments. It has a very slow release cadence, with the last release being 0.1.17.","status":"abandoned","version":"0.1.17","language":"en","source_language":"en","source_url":"https://github.com/parallels/artifactory","tags":["artifactory","jfrog","pypi","artifact-management"],"install":[{"cmd":"pip install artifactory","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"symbol":"ArtifactoryPath","correct":"from artifactory import ArtifactoryPath"}],"quickstart":{"code":"import os\nfrom artifactory import ArtifactoryPath\n\nART_URL = os.environ.get('ARTIFACTORY_URL', 'http://localhost:8081/artifactory')\nART_USER = os.environ.get('ARTIFACTORY_USERNAME', 'admin')\nART_PASS = os.environ.get('ARTIFACTORY_PASSWORD', 'password') # Or API key\n\ntry:\n    # Initialize ArtifactoryPath for a repository with authentication\n    # Note: For security, use environment variables or a config file for credentials.\n    repo_path = ArtifactoryPath(\n        f\"{ART_URL}/my-local-repo\", \n        auth=(ART_USER, ART_PASS)\n    )\n    \n    # Create a directory (if it doesn't exist)\n    repo_path.mkdir()\n    print(f\"Successfully connected and accessed: {repo_path}\")\n\n    # Example: Deploy a dummy file\n    dummy_content = b\"This is a test artifact.\"\n    artifact_name = \"test_artifact.txt\"\n    artifact_path = repo_path / artifact_name\n\n    with open(artifact_name, \"wb\") as f:\n        f.write(dummy_content)\n    \n    artifact_path.deploy_file(artifact_name)\n    print(f\"Deployed artifact: {artifact_path}\")\n    \n    # Clean up local dummy file\n    os.remove(artifact_name)\n\n    # Example: List contents of the repository\n    print(f\"\\nContents of {repo_path}:\")\n    for item in repo_path:\n        print(item)\n\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\n    print(\"Please ensure Artifactory is running and accessible, and credentials are correct.\")\n","lang":"python","description":"This quickstart demonstrates how to initialize `ArtifactoryPath` with basic authentication using environment variables and perform common operations like creating a path and deploying an artifact. It simulates deploying a file to a specified Artifactory repository."},"warnings":[{"fix":"Use `pip install pyartifactory` and update imports from `artifactory` to `pyartifactory`.","message":"This `parallels/artifactory` library is outdated and officially superseded by the `dohq-artifactory` (also known as `pyartifactory`) fork. It is strongly recommended to use `pyartifactory` for new projects and consider migrating existing ones.","severity":"breaking","affected_versions":"<=0.1.17"},{"fix":"For modern Python development, use the `pyartifactory` library instead, which is actively maintained and supports Python 3.8+.","message":"The library primarily targets older Python versions (2.7, 3.2, 3.3). While it might still function on newer Python 3 versions for basic operations, it lacks modern Python features, type hints, and robust maintenance for current Artifactory API versions. For Python 3.8+, `pyartifactory` is the recommended choice.","severity":"gotcha","affected_versions":"<=0.1.17"},{"fix":"Verify the username and password/API key. Ensure the Artifactory user has sufficient permissions for the target repository and operations. Consult Artifactory access logs for specific failures.","message":"Authentication issues (401/403 errors) are common if credentials (username/password or API key) are incorrect, or if the user lacks the necessary permissions on the Artifactory instance.","severity":"gotcha","affected_versions":"*"},{"fix":"Ensure your environment trusts the Artifactory instance's SSL certificate. If in a trusted development environment, you might temporarily disable SSL verification (e.g., in underlying `requests` calls), but this is not recommended for production.","message":"SSL certificate verification errors can occur when interacting with Artifactory, especially with self-signed certificates or misconfigured SSL. This can manifest as connection errors.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Verify Artifactory URL and credentials. Ensure the package exists in the Artifactory repository. Check pip configuration (`pip.ini`/`pip.conf`) for correct `--index-url` or `--extra-index-url` settings, potentially including `--trusted-host` if using HTTP or self-signed certificates.","cause":"This generic error often indicates issues with Artifactory accessibility, incorrect repository configuration in pip, or the package not being present/accessible in the specified Artifactory repository.","error":"Failed to install packages from artifactory"},{"fix":"Ensure the package version is compatible with your Python environment. Verify that your Artifactory repository is correctly configured as a PyPI remote or virtual repository, proxying `pypi.org` if needed. Update `pip` to a recent version (20.2 or later is recommended for Artifactory).","cause":"When fetching packages from Artifactory, `pip` may fail to find versions if the package is not available for your Python version, if the repository is misconfigured, or if metadata parsing fails.","error":"Could not find a version that satisfies requirement"},{"fix":"Update your Artifactory instance to a version that supports the latest PyPI Simple JSON API or has updated HTML parsing capabilities. Ensure Artifactory's PyPI remote/virtual repositories are correctly configured.","cause":"Changes to the HTML output of `pypi.org`'s simple API can break older Artifactory versions or clients that parse the HTML directly, leading to failures in mirroring or downloading packages.","error":"Artifactory is failing to fetch packages from pypi, as it can no longer parse the page."}]}