{"id":13907206,"url":"https://github.com/minrk/findspark","last_synced_at":"2025-05-15T12:06:47.649Z","repository":{"id":1000779,"uuid":"37345620","full_name":"minrk/findspark","owner":"minrk","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-11T08:01:15.000Z","size":53,"stargazers_count":522,"open_issues_count":11,"forks_count":71,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-14T20:57:34.586Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/minrk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-12T21:34:06.000Z","updated_at":"2025-04-10T02:01:17.000Z","dependencies_parsed_at":"2022-08-06T10:01:21.236Z","dependency_job_id":null,"html_url":"https://github.com/minrk/findspark","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minrk%2Ffindspark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minrk%2Ffindspark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minrk%2Ffindspark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minrk%2Ffindspark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minrk","download_url":"https://codeload.github.com/minrk/findspark/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254337613,"owners_count":22054253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T23:01:49.949Z","updated_at":"2025-05-15T12:06:42.636Z","avatar_url":"https://github.com/minrk.png","language":"Python","funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"# Find spark\n\nPySpark isn't on sys.path by default, but that doesn't mean it can't be used as a regular library.\nYou can address this by either symlinking pyspark into your site-packages,\nor adding pyspark to sys.path at runtime. `findspark` does the latter.\n\nTo initialize PySpark, just call\n\n```python\nimport findspark\nfindspark.init()\n\nimport pyspark\nsc = pyspark.SparkContext(appName=\"myAppName\")\n```\n\nWithout any arguments, the SPARK_HOME environment variable will be used,\nand if that isn't set, other possible install locations will be checked. If\nyou've installed spark with\n\n    brew install apache-spark\n\non OS X, the location `/usr/local/opt/apache-spark/libexec` will be searched.\n\nAlternatively, you can specify a location with the `spark_home` argument.\n\n```python\nfindspark.init('/path/to/spark_home')\n```\n\nTo verify the automatically detected location, call\n\n```python\nfindspark.find()\n```\n\nFindspark can add a startup file to the current IPython profile so that the environment vaiables will be properly set and pyspark will be imported upon IPython startup. This file is created when `edit_profile` is set to true.\n\n```\nipython --profile=myprofile\nfindspark.init('/path/to/spark_home', edit_profile=True)\n```\n\nFindspark can also add to the .bashrc configuration file if it is present so that the environment variables will be properly set whenever a new shell is opened. This is enabled by setting the optional argument `edit_rc` to true.\n\n```python\nfindspark.init('/path/to/spark_home', edit_rc=True)\n```\n\nIf changes are persisted, findspark will not need to be called again unless the spark installation is moved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminrk%2Ffindspark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminrk%2Ffindspark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminrk%2Ffindspark/lists"}